JS 禁止浏览器右键菜单和刷新

 <script language="javascript">
//禁止按键F5
document.onkeydown = function(e){
e = window.event || e;
var keycode = e.keyCode || e.which;
if( keycode = 116){
if(window.event){// ie
try{e.keyCode = 0;}catch(e){}
e.returnValue = false;
}else{// ff
e.preventDefault();
}
}
} //禁止鼠标右键菜单
document.oncontextmenu = function(e){
return false;
}
</script>
上一篇:js 屏蔽浏览器右键菜单


下一篇:Javascript中将函数参数arguments转为数组