JavaScript mask keyboard and mouse button

xiaoxiao2021-03-06  57

IF (Window.event) Document.captureEvents (Event.Mouseup);

Function nocontextmenu () {Event.cancelbubble = true evenet.returnValue = false; return false;}

Function NorightClick (e) {if (window.event) {if (e.Which == 2 || E.Which == 3) Return false;} else if (event.button == 2 || Event.Button == 3) {Event.cancelbubble = true evenet.returnvalue = false; return false;}}

Document.onContextMenu = NocontextMenu; // for IE5 Document.Onmousedown = NorightClick; // for all Others

Function LoadPage (URL) {newwin = window.open (URL, 'Article ",' resizable = yes, menubar = yes, scrollbars = yes, toolbar = no, location = no, width = 650, Height = 450 '); newwin .focus ();} // shield keyboard button if (event.keycode! = 13) {Event.Keycode = 0; Event.ReturnValue = false;}

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

New Post(0)