jQuery Mobile在PC上调试时,chrome中无法显示or加载

来源:互联网 发布:联通宽带网络怎么样 编辑:程序博客网 时间:2024/06/05 03:18

最近学习H5在移动端的开发,所以接触了jQuery Mobile,

在学习过程中发现chrome无法显示,调试中发现报“cannot be created in a document with origin 'null'

因为当时其他事情,直接用firefox调试了

因为pc端一直在使用chrome,所以感觉不方便,老是要切换到firefox,所以找了度娘,呃,还真找到了解决方法,但不知道问题的原因

解决方法:

jquery.mobile.js之前,在jquery.js之后添加

<script>
$(document).bind('mobileinit',function(){
$.mobile.pushStateEnabled = false;
});
</script>

具体出处:

百度知道:http://zhidao.baidu.com/link?url=WW73JLlS39yMvT8DFs_vbA3IxBLu6Xq31yHG5M2sRyfSl4o5giXnpRPCRH1eFrBiOUkujVPbkQh153freSjK8bMZEhSfGDRIPuXGkObTjc_

E文地址:http://stackoverflow.com/questions/32453806/uncaught-securityerror-failed-to-execute-replacestate-on-history-cannot-be

0 0
原创粉丝点击