<input type=button value="禁止IE后退键"
  onclick="location.replace(location.href)">
看看你还有路可退吗?

解决方案 »

  1.   

    let me try.. thank you
      

  2.   

    <body onload="window.history.forward(1)">
      

  3.   

    window.open()一个无“前进、“后退”的页面
      

  4.   

    1 >屏蔽功能类1.1 屏蔽键盘所有键
    <script language="javascript">
    <!--
    function document.onkeydown(){
       event.keyCode = 0;
       event.returnvalue = false;
    }
    -->
    </script>1.2 屏蔽鼠标右键在body标签里加上oncontextmenu=self.event.returnvalue=false或者<script language="javascript">
    <!--
    function document.oncontextmenu() 

      return false; 

    -->
    </script>function nocontextmenu()

        if(document.all) {
            event.cancelBubble=true;
            event.returnvalue=false; 
            return false; 
        }
    }或者<body onmousedown="rclick()" oncontextmenu= "nocontextmenu()"><script language="javascript">
    <!--
    function rclick()
    {
        if(document.all) {
            if (event.button == 2){
                event.returnvalue=false;
            }
        }
    }
    -->
    </script>
    1.3 屏蔽 Ctrl+N、Shift+F10、F5刷新、退格键<script language="javascript">
    <!--
      //屏蔽鼠标右键、Ctrl+N、Shift+F10、F5刷新、退格键
    function window.onhelp(){return false} //屏蔽F1帮助
    function KeyDown(){
      if ((window.event.altKey)&&
          ((window.event.keyCode==37)||   //屏蔽 Alt+ 方向键 ←
           (window.event.keyCode==39))){  //屏蔽 Alt+ 方向键 →
         alert("不准你使用ALT+方向键前进或后退网页!");
         event.returnvalue=false;
         }     /* 注:这还不是真正地屏蔽 Alt+ 方向键,
         因为 Alt+ 方向键弹出警告框时,按住 Alt 键不放,
         用鼠标点掉警告框,这种屏蔽方法就失效了。以后若
         有哪位高手有真正屏蔽 Alt 键的方法,请告知。*/  if ((event.keyCode == 8) && 
          (event.srcElement.type != "text" && 
          event.srcElement.type != "textarea" && 
          event.srcElement.type != "password") ||           //屏蔽退格删除键   
          (event.keyCode==116)||                            //屏蔽 F5 刷新键
          (event.ctrlKey && event.keyCode==82)){            //Ctrl + R
         event.keyCode=0;
         event.returnvalue=false;
         }
      if ((event.ctrlKey)&&(event.keyCode==78))   //屏蔽 Ctrl+n
         event.returnvalue=false;
      if ((event.shiftKey)&&(event.keyCode==121)) //屏蔽 shift+F10
         event.returnvalue=false;
      if (window.event.srcElement.tagName == "A" && window.event.shiftKey) 
          window.event.returnvalue = false;  //屏蔽 shift 加鼠标左键新开一网页
      if ((window.event.altKey)&&(window.event.keyCode==115)){ //屏蔽Alt+F4
          window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");
          return false;}
      }
     /* 另外可以用 window.open 的方法屏蔽 IE 的所有菜单
    第一种方法:
      window.open("你的.htm", "","toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=yes,status=no,top=0,left=0")
    第二种方法是打开一个全屏的页面:
      window.open("你的.asp", "", "fullscreen=yes")
     */
    //-->
    </script>1.4屏蔽浏览器右上角“最小化”“最大化”“关闭”键<script language=javascript>
    function window.onbeforeunload()
    {
      if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
      {
        window.event.returnvalue = "";
      }
    }
    </script>或者使用全屏打开页面<script language="javascript">
    <!--
    window.open(http://www.32pic.com/,"32pic","fullscreen=3,height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no");
    -->
    </script>注:在body标签里加上onbeforeunload="javascript:return false"(使不能关闭窗口)1.5屏蔽F5键<script language="javascript">
    <!--
    function document.onkeydown() 

        if ( event.keyCode==116) 
        { 
            event.keyCode = 0; 
            event.cancelBubble = true; 
            return false; 
        }
    }
    -->
    </script>1.6屏蔽IE后退按钮在你链接的时候用 <a href="javascript:location.replace(url)">1.7屏蔽主窗口滚动条在body标签里加上 style="overflow-y:hidden"1.8 屏蔽拷屏,不断地清空剪贴板在body标签里加上onload="setInterval('clipboardData.setData(\'Text\',\'\')',100)"1.9 屏蔽网站的打印功能<style>
    @media print {
       * { display: none }
    }
    </style>1.10 屏蔽IE6.0 图片上自动出现的保存图标方法一:
    <META HTTP-EQUIV="imagetoolbar" CONTENT="no">
    方法二:
    <img galleryimg="no">1.11 屏蔽页中所有的script<noscrript></noscript>呵呵,你要一颗星星,我把整个天空都给你。
    网上收藏的东东,不是我搞的。给分吧
      

  5.   

    http://dev.csdn.net/
    csdn有好多好东东,有空长去看看,别有了问题才来这儿问:)
      

  6.   

    a.asp
    <%
    session("HasVisited") = 0
    %>
    <a href=b.asp>Link to b.asp</a>b.asp
    I'm the b.asp
    <form name=form1 action=b.asp></form>
    <%
    If(session("HasVisited") = 0)Then
    %>
    <script>
    document.form1.submit();
    </script>
    <%
    session("HasVisited") = 1
    End If
    %>
      

  7.   


    1.6屏蔽IE后退按钮在你链接的时候用 <a href="javascript:location.replace(url)">------------------
    这个什么意思??
      

  8.   

    比如你从a页面到b页面
    a.asp
    <a href="javascript:location.replace('b.asp')">后退就失效了