按下后退按钮时,iPhone safari 要求确认再次提交表单
我有一个表格。当我单击提交按钮时,表单将被提交,结果将加载到下一页中。在此页面中我有一个超链接。单击该超链接后,我将转到另一个页面。此时,如果我单击浏览器的“后退”按钮,我会收到是否应该提交表单的确认。我如何禁用它?我将结果存储在 sessionStorage 中,因此不需要再次提交表单。
I have a form. When I click on the submit button the form is submitted and result is loaded in the next page. In this page I have a hyperlink. On click of that hyperlink, I am going to another page. At this point if I click 'Back' button of the browser, I get a confirmation whether I should submit the form or not. How do I disable this ? I am storing results in sessionStorage so I do not need to submit form again.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 PRG 模式,可以描述为:
参见 http://en.wikipedia.org /wiki/Post/Redirect/Get 以及来自那里的链接
Use the PRG pattern, which can be described as:
See http://en.wikipedia.org/wiki/Post/Redirect/Get and links from there