[英]HTML + Load one html partial inside another html page using Jquery Load Function
我有2个HTML文件
File 1. index.html
File 2. nav_bar.html
在这里,我尝试将静态页面nav_bar.html
加载到index.html
我尝试了一种jquery load
方法-index.html的示例代码。 即。
<script type="text/javascript">
$(function() {
$("#nav_bar").load("nav_bar.html");
});
</script>
在Firefox上可以正常使用,但Chrome无法响应以加载此文件。 我没有办法解决它。 注意:请避免使用iframe。
提前致谢。
要为Chrome禁用同一来源策略:请使用Stackoverflow Post或此
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.