The code copy is as follows:
<script language="Javascript">
<!--
//Mask the 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;}//Mask the right mouse button
function window.onhelp(){return false} //Mask F1 help
function document.onkeydown()
{
if ((window.event.altKey)&&
((window.event.keyCode==37)|| //Shield Alt+ arrow keys←
(window.event.keyCode==39))) //Mask Alt+ Arrow Key →
{
alert("You are not allowed to use the ALT+ arrow keys to advance or back the web page!");
event.returnValue=false;
}
/* Note: This is not really blocking the Alt+ arrow keys,
Because when the Alt+ arrow key pops up the warning box, press and hold the Alt key and keep it in place.
Click the warning box with the mouse, and this blocking method will fail. If
Any expert who has a way to really block the Alt key, please let me know. */
if ((event.keyCode==8) || //Mask backspace deletion 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; //Mask Ctrl+n
if (event.shiftKey && event.keyCode==121)event.returnValue=false; //Shift shift+F10
if (window.event.srcElement.tagName == "A" && window.event.shiftKey)
window.event.returnValue = false; //Shift Shift Add the left mouse button to open a new web page
if ((window.event.altKey)&&(window.event.keyCode==115)) //Shield Alt+F4
{
window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");
return false;
}
}
-->
</script>