问题描述
如何在提交后清除表单中的信息,以便在页面刷新后不会显示此错误?
查看图片(来自Chrome):
对话框包含文本:
我想要此对话框不显示。
它与您的表单或其中的值无关。它被浏览器触发,以防止用户使用缓存的数据重复相同的请求。如果您真的需要启用结果页面的刷新,您应该通过PHP( header('Location:result.php');
)或其他您使用的服务器端语言。 Meta标记解决方案也应该可以禁用刷新时重新发送。
How do I clean information in a form after submit so that it does not show this error after a page refresh?
See image (from chrome):
The dialog has the text:
I want this dialog not to appear.
It has nothing to do with your form or the values in it. It gets fired by the browser to prevent the user from repeating the same request with the cached data. If you really need to enable the refreshing of the result page, you should redirect the user, either via PHP (header('Location:result.php');
) or other server-side language you're using. Meta tag solution should work also to disable the resending on refresh.
这篇关于如何防止“确认表单重新提交”对话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!