Shielding the right mouse button, F1 Help and common shortcut keys

Source: Internet
Author: User
Tags delete key key window
With the shortcut key/*** the right mouse button, F1 Help and the common shortcut key * author:huangyuyuan* Date:2004-09-10*/function shield () {function Document.oncontextmenu ( ) {Event.returnvalue=false;} right mouse button function Window.onhelp () {return false}//mask 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 + Direction key forward or after Back page! "); Event.returnvalue=false; }/* Note: This is not really shielding ALT + direction key, because ALT + arrow pop-up warning box, hold down the ALT key, with the mouse point off the warning box, this shielding method is ineffective. In the future, if there is a real master to screen the Alt key method, please inform. */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; Shielding CTRL + N if (event.shiftkey && event.keycode==121) Event.returnvalue=false; Shielding SHIFT+F10 if (window.event.srcElement.tagName = = "A" &&Amp Window.event.shiftKey) Window.event.returnValue = false; Screen shift plus left mouse button new page if ((Window.event.altKey) && (window.event.keycode==115))//Shield Alt+f4 { Window.showmodelessdialog ("About:blank", "" "," dialogwidth:1px;dialogheight:1px "); return false; } }}





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.