oli*_*ier 31 javascript jquery google-chrome jquery-mobile
我真的没有得到这个chrome错误:
未捕获的SecurityError:无法在"历史记录"上执行"replaceState":无法在原点为"null"的文档中创建
在Edge,Firefox和IE中没有错误.
我使用jquery 1.11.1和jquery mobile 1.4.5.
这是我的索引文件:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/xy.min.css" />
<link rel="stylesheet" href="css/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="css/jquery.mobile.structure-1.4.5.min.css" />
<title></title>
</head>
<body>
<div data-role="page">
<div data-role="header" data-add-back-btn="true">
<p align="center">Test</p>
</div>
<ul data-role="listview" data-filter="true" data-filter-placeholder="Kategorie suchen" data-inset="true" data-count-theme="b">
<li><a href="assets/beck/index.html" data-rel"dialog" rel ="external">Bäckereien </a></li>
</ul>
</div>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
任何帮助非常感谢!
eFM*_*Mer 61
添加这个:
<script>
$(document).bind('mobileinit',function(){
$.mobile.changePage.defaults.changeHash = false;
$.mobile.hashListeningEnabled = false;
$.mobile.pushStateEnabled = false;
});
</script>
Run Code Online (Sandbox Code Playgroud)
就在jquery.mobile-1.4.5.min.js之前
这适用于Windows上的Android WebViewClient和Chrome.
oli*_*ier 25
我的解决方案是我必须运行一个网络服务器.这是一个新的Chrome安全功能,不会根据Chromium Bug Post进行更改.
感谢A. Wolff!
| 归档时间: |
|
| 查看次数: |
42247 次 |
| 最近记录: |