This article is mainly to screen the corresponding keyboard button operation code is introduced, the need for friends can come to the reference, I hope to help you.
Code as follows: <script language= "Javascript" > <!-- //Shielded right mouse button, CTRL + N, SHIFT+F10, F11, F5 refresh, backspace key / /author:meizz (Plum blossom rain) 2002-6-18 function Document.oncontextmenu () {event.returnvalue=false;} The right mouse button function Window.onhelp () {return false}//mask F1 help function Document.onkeydown () { if (Window.event.altKey ) && (window.event.keycode==37) | | //Shielding ALT + Direction key ← (window.e vent.keycode==39)) //shielding ALT + Direction key → { alert ("You are not allowed to use ALT + arrow keys forward or back page!") "); event.returnValue=false; } /* Note: This is not really shielding ALT + direction key, because ALT + Direction key pop-up warning box, hold alt key, &NBS p; With the mouse point off the warning box, this shielding method is invalid. In the future, if who has a real screen Alt key method, please inform. * if ((event.keycode==8) | | //Screen backspace delete key (event.keycode==116) | | &NBsp //Shielding F5 Refresh key (Event.ctrlkey && event.keycode==82)) {//ctrl + R even t.keycode=0; event.returnValue=false; &NBSP} if (event.keycode==122) {event.keycode=0;event.returnvalue=false} //mask F11 IF (Event.ctrlkey && event.keycode==78) Event.returnvalue=false; //Shielding CTRL + N if (Event.shiftkey && event.keycode==121) Event.returnvalue=false; //Shielding SHIFT+F10 if (window.event.srcElement.tagName = "A" && Window.event.shiftKey) & nbsp Window.event.returnValue = false; //Screen shift plus left mouse button new page if ((Window.event.altKey) && (WINDOW.EVENT.K eycode==115) //shielding Alt+f4 { Window.showmodelessdialog ("About:blank", "", "dialogwidth:1px;dialogheight:1px"); return false; }}--> </script>