戻るボタン禁止

|

meta tag :::::::::::::
   <meta http-equiv="Pragma" content="no-cache">
   <meta http-equiv="Expires" content="0">
   <meta http-equiv="Cache-Control" content="no-cache">


html :::::::::::::::::::
   <body onunLoad="window.location.replace('mypage.html')">



javascript::::::::::::::::::::::::
<html>

<head>
<title>戻るボタン禁止</title>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
ok_urls = new Array();
ok_urls[1] = "http://xxx.xxx.xxx";
ok_urls[2] = "http://xxxx.xxxx.xxxxxx";

function reportError(msg, url, line) {
if (url == window.location.href) {

msg = "\n\n\n" +
"\n";
alert(msg);

top.location.href = ok_urls[1] + "?" + window.location.href;
return true;
   }
}

window.onerror = reportError;

url_found = 0;
for (var i = 1; i <= ok_urls.length && !url_found; i++) {
url_found = (parent.location.href.indexOf(ok_urls[i]) == -1);
}
if (!url_found || (window == top))
top.location.href = ok_urls[1] + "?" + window.location.href;
//  End -->
</script>
</head>

<body>


</body>

</html>

javascript::::::::::::::::::::::::
<script type="text/javascript">
<!--
  history.forward();
-->
</script>

'TIP' 카테고리의 다른 글

비주얼 스튜디오 단축키  (0) 2011.09.08
ウィンドウ終了  (0) 2010.11.01
우클릭 잠금/해제  (0) 2010.07.01
携帯ShiftJIS  (0) 2010.06.16
asp2php, php2asp  (0) 2010.06.14
And