Copy Code code as follows:
<script language= "Javascript" type= "Text/javascript" >
Screen the right mouse button, CTRL + N, SHIFT+F10, F11, F5 refresh, backspace key
function Document.oncontextmenu () {
Event.returnvalue = false;
}//Screen right mouse button
function Window.onhelp () {
return False
}//Shielding F1 Help
function Document.onkeydown () {
if ((Window.event.altKey) && ((Window.event.keyCode = 37) | |//Shielding ALT + Direction key ←
(Window.event.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 + arrow keys,
Because ALT + ARROW keys pop-up warning box, hold down the ALT key,
With the mouse point off the warning box, this shielding method is invalid. Later if
There is a master who has really shielded the Alt key method, please inform. */
if ((Event.keycode = 8) | |//SHIELDING BACKSPACE Delete key
(Event.keycode = 116) | | Mask F5 Refresh Key
(event.ctrlkey && event.keycode = 82)) {//ctrl + R
Event.keycode = 0;
Event.returnvalue = false;
}
if (Event.keycode = = 122) {
Event.keycode = 0;
Event.returnvalue = false;
}
Shielding F11
if (event.ctrlkey && event.keycode = =) Event.returnvalue = false;
Block CTRL + N
if (event.shiftkey && event.keycode = = 121) Event.returnvalue = false;
Shielding SHIFT+F10
if (Window.event.srcElement.tagName = "A" && Window.event.shiftKey)
Window.event.returnValue = false; Screen shift plus left mouse button new page open
if ((Window.event.altKey) && (Window.event.keyCode = 115))//Shielding ALT+F4
{
Window.showmodelessdialog ("About:blank", "" "," dialogwidth:1px;dialogheight:1px ");
return false;
}
}
</script>