|
|
一段时间内提交表单时,点击后退按钮时,还可以提交表单。一时找不到解决方法,也就没再过多考虑,今天突然找到解决方法。
<meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"> 也可这样写。
<% response.setHeader("pragma","no-cache"); response.setHeader("cache-control","no-cache"); response.setDateHeader("expires",0);%> 再后退的时候,网页就会失效或过期。
或是使用struts的时候,使用token来处理这个问题。
<div style="border: 1px solid #000000; margin: 0pt; padding: 0pt; display: none; width: auto;"> |
|