Disable the refresh key F5 on the keyboard.

Source: Internet
Author: User
<Script language = "JavaScript"> <! -- // Shield right-click, CTRL + N, Shift + F10, F11, F5 refresh, backspace key // Author: meizz (plum blossom rain) 2002-6-18 function document. oncontextmenu () {event. returnvalue = false;} // right-click the screen and select function window. onhelp () {return false} // block the F1 help function document. onkeydown () {If (window. event. altkey) & (window. event. keycode = 37) | // mask Alt + direction key trim (window. event. keycode = 39) // block Alt + direction keys → {alert ("You are not allowed to use Alt + direction keys to move forward or backward the webpage! "); Event. returnvalue = false;}/* Note: this does not really block Alt + direction keys, because when Alt + direction keys pop up the warning box, press and hold the Alt key. Use the mouse to drop the warning box. This blocking method will become invalid */If (event. keycode = 8) | // specifies the event that is used to block the unsigned deletion key. 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) // mask Alt + F4 {window. showmodelessdialog ("about: blank", "", "dialogwidth: 1px; dialogheight: 1px"); Return false ;}</SCRIPT>

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.