如何使用javascript重新加载页面而不再发送POST信息 [英] How to reload page with javascript without sending POST information again
本文介绍了如何使用javascript重新加载页面而不再发送POST信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个页面,我通过 form method =post
向我发布信息。我想用JavaScript重新加载它,但 location.reload(true)
和 location.reload()
使浏览器成为可能询问我是否要再次发送POST数据。
I have a page, to which I POST information via form method="post"
. I would like to relaod it with JavaScript, but location.reload(true)
and location.reload()
makes browsers ask if I want to send the POST data again.
我想让JavaScript重新加载页面,使用GET而不是POST来跳过POST数据。
I would like to make JavaScript reload the page with GET instead of POST to skip the POST data.
我该如何实现?
推荐答案
window.location.href = window.location.href
试试
这篇关于如何使用javascript重新加载页面而不再发送POST信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文