gpt4 book ai didi

javascript - 不显示 : To display the webpage again internet explorer needs to resend the information you've previously submitted

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:37:21 32 4
gpt4 key购买 nike

我不想在回发时显示下面的弹出消息。我的页面与定价无关,它显示的是在回发时更新的 ms 图表。如何在代码或 java 脚本中禁用?

to display the webpage again internet explorer needs to resend the information you've previously submitted.

这是我试过的 javascript:虽然不起作用。

<script type="text/javascript">
// <!--
function submitForm() {
window.opener.document.forms[0].submit();
}
// -->
</script>

并将函数附加到表单:

<body>
<form id="form1" runat="server" onsubmit="submitForm()">

最佳答案

我敢打赌你会在你的 JavaScript 中这样做:

FB.Event.subscribe('auth.login', function(response) {
window.location.reload();
});
FB.Event.subscribe('auth.logout', function(response) {
window.location.reload();
});

虽然上述代码来自 Facebook 文档,并且适用于实现 Facebook JavaScript SDK 的独立网站,但它会在 Internet Explorer 和 Firefox 中通过导致无限循环来破坏您的 Facebook 应用程序

当 Facebook 加载应用程序时,它会通过 POST 发送有关用户身份验证状态的信息。 SDK 处理这些数据并对用户进行身份验证。

通过告诉 JavaScript SDK 在成功验证后重新加载页面,Firefox 和 Internet Explorer 将其解释为它们也应该再次发送 POST 数据。您的 App 再次收到 POST 数据,重新验证用户身份,并重新加载页面,导致死循环。

解决方案:不要使用 window.location.reload()。相反,您需要设置 window.location.href(或以其他方式从浏览器请求中删除 POST 数据)。

关于javascript - 不显示 : To display the webpage again internet explorer needs to resend the information you've previously submitted,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7029966/

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