Shielded mouse button, F1 help and common shortcuts

xiaoxiao2021-03-06  37

/ *** Shield mouse right, F1 help and common shortcuts * Author: sunlen * Date: 2004-09-10 * / function shield () {event.returnValue = false;} // Shield Right-click Function WINDOW.ONHELP () {Return False} // Shield F1 Help Function Document.onkeyDown () {if ((Window.Event.altKey) && ((Window.Event.KeyCode == 37) || // Shield Alt arrow keys ← (WINDOW.EVENT.KEYCODE == 39))) // Shield Alt Direction Key → {ALERT ("Do not allow you to use the Alt direction button to advance or retreat page!"); Event.ReturnValue = false;} / * Note: This is not really shielding the Alt arrow key because the Alt Direction key pops the warning box, hold down the Alt key, use the mouse points to the warning box, this shield method is invalid. In the future, if you have a master with a virtual shielding ALT key, please let. * /

IF ((Event.Keycode == 8) || // Mask Equation Delete Keys (Event.KeyCode == 116) || // Shield F5 Refresh Keys (Event.ctrlKey && Event.KeyCode == 82)) {/ / Ctrl r Event.keycode = 0; event.ReturnValue = false;} if (event.keycode == 122) {Event.Keycode = 0; Event.ReturnValue = false;} // Shield F11 IF (Event.ctrlKey && Event.keycode == 78) Event.ReturnValue = false; // Shield Ctrl n if (Event.shiftkey && event.keycode == 121) Event.ReturnValue = false; // Shield Shift F10 IF (Window.event. Srcelement.tagname == "a" && window.event.shiftkey) WINDOW.EVENT.RETURNVALUE = false; // Mask Shift Rati Z. The left button newly opened a web page IF (Window.event. Keycode == 115) // Shield Alt F4 {WINDOW.SHOWMODELESSDIALOG ("About: blank", "Dialogwidth: 1px; DialogHeight: 1px"); return false;}}}

9CBS certified blog expert

Blog expert

Huawei old employees

Big Data

More than ten years, in Huawei, Internet Corporation's experience, profound understanding and practical experience in CRM, big data, mainly sharing various project experience, including architecture, Java, big data and other articles

转载请注明原文地址:https://www.9cbs.com/read-47570.html

New Post(0)