我有两个HTML文件
File 1. index.html
File 2. nav_bar.html在这里,我尝试将静态页面nav_bar.html加载到index.html中
我尝试了index.html的jquery load方法中的一个示例代码。即。
<script type="text/javascript">
$(function() {
$("#nav_bar").load("nav_bar.html");
});
</script>在Firefox上运行良好,但Chrome没有响应加载此文件。我没有办法解决这个问题。注意:请避免使用iframe。
提前谢谢。
发布于 2014-06-05 15:46:00
要禁用chrome的同源策略:使用Stackoverflow Post或this
https://stackoverflow.com/questions/24054255
复制相似问题