PHP 網頁達到以下目的
- 禁止返回上頁
- 避免因 "重新整理網頁"
(Reload Page) 造成資料重送
PHP
11<script language="JavaScript">
12 | //讓 "回上頁不觸發 onload() 事件的瀏覽器" 也能 "禁止回上頁" |
13 | //Ref: http://www.boutell.com/newfaq/creating/backbutton.html |
14 | setTimeout("fn_forward()",1); |
15 | function fn_forward() { |
17 | setTimeout("fn_forward()",1); |
21 | <body onload="history.go(1);fn_forward();"> |
|
| "history.go(1);fn_forward();" >
|
| "history.go(1);fn_forward();" >
|
沒有留言:
張貼留言