I want to load a specific html file and load it into the current page under a specific div. I use the following code:
<script>
$(document).ready(function(){
$("#link").click(function(){
$("#myDiv").load("load.html");
});
});
</script>
and the link tag is like this:
<li><span class="section"><a id="link" href="javascript:void(0);">Test</a></span></li>
But i am getting these errors:
OPTIONS file:///load.html No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. jquery.js:8706
send jquery.js:8706
x.extend.ajax jquery.js:8136
x.fn.load jquery.js:7745
(anonymous function) ec.html:71
x.event.dispatch jquery.js:5095
v.handle
XMLHttpRequest cannot load file:///load.html. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.