The code is as follows:
Disable right key, text selection, copy key
$ (document). Bind ("ContextMenu", function () {return false;});
$ (document). Bind ("Selectstart", function () {return false;});
$ (document). KeyDown (function () {return key (Arguments[0])});
Prompt warning when pressing
Function key (e) {
var keynum;
if (window.event) {
Keynum = E.keycode; Ie
}else if (E.which) {
Keynum = E.which; Netscape/firefox/opera
}
if (Keynum = = 17) {
Alert ("Prohibit copying content!");
return false;
}
}
Disable right key, text selection, copy key
$ (document). Bind ("ContextMenu", function () {return false;});
$ (document). Bind ("Selectstart", function () {return false;});
$ (document). KeyDown (function () {return key (Arguments[0])});
Prompt warning when pressing
Function key (e) {
var keynum;
if (window.event)//IE
{
Keynum = E.keycode;
}
else if (E.which)//Netscape/firefox/opera
{
Keynum = E.which;
}
if (Keynum = =) {alert ("Prohibit copying content!"); return false;}
}
Screen the right mouse button, CTRL + N, SHIFT+F10, F11, F5 refresh, backspace key
function Document.oncontextmenu () {event.returnvalue=false;} Mask right mouse button
function Window.onhelp () {return false}//Shield 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;
} 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;}//Mask F11
if (Event.ctrlkey && event.keycode==78) 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)) {//Shield ALT+F4
Window.showmodelessdialog ("About:blank", "" "," dialogwidth:1px;dialogheight:1px ");
return false;
}
}