javascript event which
@March 15, 2008, 1:22 a.m.
which | Firefox/Netscape/NN 4 IE n/a Chrome/Safari/DOM n/a |
Read-only | |
Returns a value relevant to the type of event. For mouse events, the property value is an integer indicating which mouse button was used (1 is the left button; 3 is the right button). For keyboard events, the property value is an integer of the keyboard character ASCII code. This property survives in Netscape 6 as a carryover from the Navigator 4 event model. Use the button, charCode, and keyCode properties if you no longer need to support Navigator 4. |
|
Example | |
if (evt.which == 65) { ... } |
|
Value | |
Integer. |
|
Default | |
None. |
Permanent URL:
http://javascript.gakaa.com/event-which.aspx
Powered by Linode.