退出登入後點擊瀏覽器後退按鈕仍然可以顯示系統內容
阿新 • • 發佈:2021-01-21
在index頁面加入以下js即可:
<script> history.go(1); </script>
例如:
<html> <head> <title>系統首頁</title> <script language='javascript'> history.go(1); </script> <meta http-equiv=Content-Type content=text/html;charset=gb2312> </head> <s:if test="#session.user == null"> <c:redirect url="error.jsp"></c:redirect> </s:if> <frameset rows="64,*" frameborder="NO" border="0" framespacing="0"> <frame src="top.jsp" noresize="noresize" frameborder="NO" name="topFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" /> <frameset cols="200,*" rows="560,*" id="frame"> <frame src="left.jsp" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" target="main" /> <frame src="right.jsp" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="_self" /> </frameset> </frameset> <noframes> <body></body> </noframes>