Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 在提交表单后点击“返回”按钮时防止浏览器警告
当用户使用 POST 方法提交表单后单击返回按钮时,如何避免浏览器刷新错误消息?
使用发布/重定向/获取 (PRG) 模式
如果用户单击返回,他们将跳过表单处理程序页面(因为它已重定向),因此他们不会重新提交表单并且不会收到警告。