通过javascript重新加载页面:避免“回发”警告 [英] Reloading page through javascript: avoid the "Postback" warning

查看:76
本文介绍了通过javascript重新加载页面:避免“回发”警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过javascript触发页面重新加载,使用以下内容:

I'm triggering a page reload through javascript, using the following:

window.location.reload(true);

但是,在某些情况下(以前的回发),浏览器会给我以下警告To再次显示网页,网络浏览器需要重新发送您之前提交的信息...。

However, in some cases (of previous postback), the browser is giving me the following warning "To Display the webpage again, the web browser needs to resend the information you've previously submitted...".

有没有办法避免此消息并且只是执行无论如何回发,因为这可能会让用户感到困惑?如果我需要通过其他方式重新加载页面,那就这样吧。

Is there any way of avoing this message and just doing the postback anyway, because this might be confusing for the users? If I need to reload the page by another means, so be it.

推荐答案

我认为没有办法在进行重新加载时,在没有消息的情况下进行回发。

I don't think there is any way to do a postback without the message when you are doing the reload.

顺便说一下,重装是什么?如果是再次提交POST信息,我建议您使用javascript通过ajax或隐藏表单提交手动提交数据。

Btw, whats the reload for? If it is for submitting the POST information again, i suggest you manually submit the data through ajax or a hidden form submission using javascript.

这篇关于通过javascript重新加载页面:避免“回发”警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆