JS Shielding effect
Copy Code code as follows:
/** Shielding F1 Help * *
Window.onhelp = function () {return false;}
/**
* Shielding F5, CTRL + N, SHIFT+F10, ALT+F4
* If you want to block other keys, then find the corresponding KeyCode and then follow this method can be
*/
Document.onkeydown = function (event) {
event = Window.event | | 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;
}
}
/** Screen Mouse Right button * *
Document.oncontextmenu = function () {return false;}
Or
Document.onmousedown = function (event) {
event = Window.event | | Event
if (document.all && Event.button = 2) {
Event.returnvalue=false;
}
}
/**
* Mask back function (<a href= "javascript:replacelocation" mce_href= "http://www.google.com") javascript:replacelocation ( ' http://www.google.com ') ">Google</a>)
* @param url to the URL page to turn to
*/
function replacelocation (URL) {
Document.location.replace (URL);
}
/** Screen selected Web content
Document.onselectstart=function () {return false;}
/** screen Copy Web content * *
Document.body.oncopy = function () {return false;}
/** screen Cut page content * *
Document.body.oncut = function () {return false;}
/** shielding to the Web page paste content * *
Document.body.onpaste = function () {return false;}
/** Shield screen (constantly emptying the Clipboard) * *
Window.setinterval (' Window.clipboarddata ("Text", "") ', 100);
/**
* Screen View source file (<body onload=clear () >)
*/
function Clear () {
var source=document.body.firstchild.data;
Document.open ();
Document.close ();
Document.body.innerHTML = source;
}
/**
* Block JS Error
*/
function Killerror ()
{
return true;
}
Window.onerror=killerror;