<分区>
我想使用 jQuery 显式地包含我的 html 页面的公共(public)内容
但是我做不到请帮助一些人
XMLHttpRequest cannot load file:///C:/Users/dell/Desktop/html/header.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource. jquery-1.11.2.min.js:4
XMLHttpRequest cannot load file:///C:/Users/dell/Desktop/html/footer.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
我的控制台出现这个错误
这是我的代码
<html>
<head>
<title></title>
<script src="jquery-1.11.2.min.js"></script>
<script>
$(function(){
$("#header").load("header.html");
$("#footer").load("footer.html");
});
</script>
</head>
<body>
<div id="header"></div>
<!--Remaining section-->
<div id="footer"></div>
</body>
</html>
请帮忙