Today, when I am working on a project, users are not allowed to click the browser to move back and share it with you.
<Script language = "JavaScript" type = "text/JavaScript" Defer>
History. Go (1 );
</SCRIPT>
<Script language = "JavaScript"> <! --
Function document. oncontextmenu () {event. returnvalue = false;} // right-click the screen
Function window. onhelp () {return false} // block F1 help
Function document. onkeydown ()
{
If (window. event. altkey )&&
(Window. event. keycode = 37) | // mask Alt + direction key seek
(Window. event. keycode = 39) // mask Alt + direction key →
{
Alert ("You are not allowed to use Alt + arrow keys to move forward or backward the webpage! ");
Event. returnvalue = false;
}
/* Note: this does not really block Alt + direction keys,
Because when the Alt + direction key pop-up warning box is displayed, press and hold the Alt key,
With the mouse clicked off the warning box, this blocking method will become invalid. If
Which of the following methods does the master really block the Alt key. */
If (event. keycode = 8) | // shield the unregeed deletion key
(Event. keycode = 116) | // block the 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;} // block F11
If (event. ctrlkey & event. keycode = 78) event. returnvalue = false; // block Ctrl + n
If (event. shiftkey & event. keycode = 121) event. returnvalue = false; // block SHIFT + F10
If (window. event. srcelement. tagname = "A" & window. event. shiftkey)
Window. event. returnvalue = false; // block shift with the left mouse button to open a new page
If (window. event. altkey) & (window. event. keycode = 115) // block Alt + F4
{
Window. showmodelessdialog ("about: blank", "", "dialogwidth: 1px; dialogheight: 1px ");
Return false;
}
}
</SCRIPT>
Http://s.click.taobao.com/t_8? E = 7hz5x % 2bozdswsvvyc5jts79au1q % 3d % 3d & P = mm_24156262_0_0