1 function disableInfo() { 2 document.onkeydown = function() { 3 var e = window.event || arguments[0]; 4 //屏蔽F12 5 if(e.keyCode == 123) { 6 return false; 7 //屏蔽Ctrl+Shift+I 8 } else if((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) { 9 return false; 10 //屏蔽Shift+F10 11 } else if((e.shiftKey) && (e.keyCode == 121)){ 12 return false; 13 } 14 }; 15 //屏蔽右键单击 16 document.oncontextmenu = function() { 17 return false; 18 } 19 }