/**屏蔽F1幫助*/
window.onhelp = function(){return false;}
/**
*屏蔽 F5、Ctrl N、Shift F10、Alt F4
*如果想要屏蔽其他鍵,則找到對應的 keyCode 再依此方法即可
*/
document.onkeydown = function(event){
event = window.event ||事件; 🎜>if(event.keyCode==116 || (event.ctrlKey && event.keyCode==78) || (event.shiftKey && event.keyCode==121) || (event.altKey && event.keyCode= = 115)){
event.keyCode =0;
event.returnvalue = false;
}
}
/**屏蔽滑鼠右鍵*/
document.oncontextmenu = function(>*/
document.oncontextmenu = function( ){return false;}
//或
document.onmousedown = function(event ){
事件= window.event ||事件;
if(document.all && event.button == 2) {
event.returnvalue=false;
}
}
/**
* 屏蔽「後退」功能(
Google)
* @param url 頁面要轉向的URL
*/
函數replaceLocation(url){
document.location.replace(url );
}
/**屏蔽選取網頁內容*/
document.onselectstart=function(){return false;}
/**屏蔽複製網頁內容*/
document.body. oncopy = function(){return false;}
/**屏蔽剪切網頁內容*/
document.body.oncut = function(){return false;}
/**屏蔽向網頁貼上內容*/
document.body.onpaste = function(){return false;}
/**屏蔽拷問畫面(不停的清空剪貼簿)*/
window.setInterval('window.clipboardData("Text", "")', 100) ;
/**
* 屏蔽查看原始檔( )
*/
functionclear() {
var source=document.body.firstChild.data;
document.open();
document.close() ;
document.body.innerHTML = 來源;
}
/**
* 屏蔽js報錯
*/
function KillError()
{
return true
; 🎜>window.onerror=KillError;