gpt4 book ai didi

javascript - JQuery 移动对话框错误 SecurityError : The operation is insecure

转载 作者:行者123 更新时间:2023-11-28 10:51:49 25 4
gpt4 key购买 nike

我使用 HTML 和 JQuery mobile 进行phonegap,但是当我使用此代码测试它时,它显示错误 SecurityError: 该操作不安全。 换页功能运行良好,为什么会发生这种情况?

$.mobile.changePage( "#confirm", { 
role: "dialog"
})

这是我在index.html 文件中的对话框HTML

<div data-role="page" id="confirm">
<div data-role="header" id="header">
<div class="header">
<div class="header-logo"></div>
</div>
<div class="header-bottom"></div>
</div>

<div data-role="content" class="ui-content" id="logedin-view">
<div class="border-logedin">
<center><h3>Title Loged in Main</h3></center>
</div>
<form id="codesend">
<input type="text" id="code" class="input" placeholder="Code" required/>
</form>
<center>
<button type="submit" form="codesend" id="code-send" class="input btn-submit" value="submit" data-role="none">Submit</button>
</center>
<a href="#index" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b ui-icon-back ui-btn-icon-left" data-rel="back">Go Back</a>
</div>

<div class="footer" data-role="footer">
</div>
</div>

最佳答案

在这种情况下,问题出在这一行:

window.history.replaceState( state, state.title || document.title, href );

(在版本1.4.5第2954行)

我不确定它的作用,但是在注释掉它之后,我的代码起作用了。

关于javascript - JQuery 移动对话框错误 SecurityError : The operation is insecure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31914634/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com