如何在js里面禁止网页后退,具体在什么事件里写啊  ,看了网上很多方法 ,试了试不管用阿  希望能给出具体代码 

解决方案 »

  1.   

    加载到本页时使用window.location.replace("禁用后退的页面.html");
      

  2.   

    在IE中
    if((window.event.altKey)&& ((window.event.keyCode==37)|| (window.event.keyCode==39)))               
    {  alert("不能后退");        //屏蔽Alt+方向键→     
     event.returnValue=false;  
     }
    ff中用e.which<A HREF="PageName.htm" onclick="javascript:location.replace(this.href); event.returnValue=false; "> 禁止后退到本页面的链接 ...