Name
which — NN 4 IE n/a DOM n/a
Synopsis
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.
Example
if (evtObj.which == 65) { ... }
Value
Integer.
Default
None.
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.