屏蔽IE的前进 后退一般用
window.location.replace("newpage.htm")
屏蔽右键的代码<body oncontextmenu="return false">

解决方案 »

  1.   

    <html>
    <head>
    <META http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body>
    <SCRIPT language=JavaScript1.2>
    if (window.Event)
      document.captureEvents(Event.MOUSEUP);
    function norightclick(e)
    {
    if (window.Event)
    {
    if (e.which == 2 || e.which == 3)
    {
    alert("您按了右键!?")
    return false;
    }
    else
    alert("您按了左键!!")
    }
    else
    {
    if (event.button == 2 || event.button == 3)
    alert("您按了右键!!")
    else
    alert("您按了左键!!")
    }
    }
    document.onmousedown = norightclick;
    </SCRIPT>
    右键的完整代码!</body>
    </html>
      

  2.   

    打开一个新窗口可以把状态栏,前进后退给屏蔽掉,如果是单独的一个完事窗口的话,他是不可以的.
    屏蔽右键代码:<body oncontentMenu = "return false">