I have a code.html file containing the following code.
$.ajax({ type: "POST", datatype: "JSONP", url: "path", success: function(msg){ var e = document.createElement("div"); e.id = "ads"; document.body.appendChild(e); $("#ads").html(msg); } });
When I open the code.html file in the browser, it gives an error:
**"XMLHttpRequest cannot load file://..... Origin null is not allowed by Access-Control-Allow-Origin."**
Please help me! how to avoid this problem
javascript php
Thasni anes
source share