在我的项目中,我使用的是
Javascript代码history.back();回到上一页.(如窗口上的后箭头).
@H_403_2@这个功能在IE和Firefox上工作得很好但在google crome上没有?
<input type="button" value="Go back" onclick="history.go(-1); return false" />
我明白了这个错误
Confirm Form Resubmission
This web page requires data that you entered earlier in order to be@H_403_2@ properly displayed. You can send this data again,but by doing so you@H_403_2@ will repeat any action this page prevIoUsly performed. Press Reload to@H_403_2@ resend that data and display this page.
谷歌搜索,但每个人都在建议history.go(-1);返回false;但它也不起作用.还尝试过history.back(),但这也无济于事
解决方法
POST请求后显示上一页(通常在提交表单时发生).这意味着,要显示上一页,必须再次提交在POST请求中提交的表单数据.它与您的history.go(-1)无关,当您按下浏览器的后退按钮时也会发生这种情况.
您可以使用Post Redirect Get模式解决此问题.
您也可以在表单上使用GET:
<form action="..." method="GET">
但是,不要将此用于在服务器上添加数据的表单,或者每次用户使用后退按钮并返回此页面时都会将其提交.另见:When should I use GET or POST method?