<script>
//禁止ctrl+n和禁止ctrl+r和禁止shift+f10禁止鼠标右键or左右键和禁止f5
var oLastBtn=0,bIsMenu=falseif (window.Event)
{
document.captureEvents(Event.MOUSEUP); 
}function nocontextmenu()

event.cancelBubble=true;
event.returnValue=false; 
return false; 
}

function norightclick(e) { 
if(window.Event) 

if (e.which !=1)
{
return false; 
}

else 
if(event.button!=1) 

event.cancelBubble=true;
event.returnValue=false; 
return false; 

}document.oncontextmenu=nocontextmenu; 
document.onmousedown=norightclick; function onKeyDown()
{
if ((event.altKey)||((event.keyCode==8)&&(event.srcElement.type!="text"&&event.srcElement.type!="textarea"&&event.srcElement.type!="password"))||((event.ctrlKey)&&((event.keyCode==78)||(event.keyCode==82)))||(event.keyCode==116))
{
event.keyCode=0;
event.returnValue=false;
}
}
</script>
<body onkeydown="onKeyDown()">----------------------------------------------------------------要去除菜单条、工具条和状态条等,只能是新打开一个窗口
window.open("url","","menubar=no,location=no,status=no,toolbar=no"
具体的你可以查一查msdn,那里比较详细

解决方案 »

  1.   

    <script>
    //禁止ctrl+n和禁止ctrl+r和禁止shift+f10禁止鼠标右键or左右键和禁止f5
    var oLastBtn=0,bIsMenu=falseif (window.Event)
    {
    document.captureEvents(Event.MOUSEUP); 
    }function nocontextmenu()

    event.cancelBubble=true;
    event.returnValue=false; 
    return false; 
    }

    function norightclick(e) { 
    if(window.Event) 

    if (e.which !=1)
    {
    return false; 
    }

    else 
    if(event.button!=1) 

    event.cancelBubble=true;
    event.returnValue=false; 
    return false; 

    }document.oncontextmenu=nocontextmenu; 
    document.onmousedown=norightclick; function onKeyDown()
    {
    if ((event.altKey)||((event.keyCode==8)&&(event.srcElement.type!="text"&&event.srcElement.type!="textarea"&&event.srcElement.type!="password"))||((event.ctrlKey)&&((event.keyCode==78)||(event.keyCode==82)))||(event.keyCode==116))
    {
    event.keyCode=0;
    event.returnValue=false;
    }
    }
    </script>
    <body onkeydown="onKeyDown()">----------------------------------------------------------------要去除菜单条、工具条和状态条等,只能是新打开一个窗口
    window.open("url","","menubar=no,location=no,status=no,toolbar=no"
    具体的你可以查一查msdn,那里比较详细
      

  2.   

    用window.showModalDialog吧,IE的菜单条,工具条,地址条和状态条,热键“F5”和右键菜单什么都没有了。什么都不用设置的。
      

  3.   

    我在做一个纯用客户端代码实现的页面,只用一个html文件,但是要管理一些数据,我怕用户不小心刷新页面,所以必需屏蔽刷新网页的功能,或者能够在刷新、关闭之前保存数据
      

  4.   

    我想可以在unload的时候进行数据的保存,但不知道此时还能不能操作body对象
      

  5.   

    用unload,只能重新打开一个页面,在另一个页面保存。
      

  6.   

    我的意思是在window的onunload事件中,把当前状态都保存起来,然后在onload事件中把保存的状态回复,这样可行吧?