↑
Main Page
Properties/methods
Properties/methods
Internet Explorer
Here are the event properties and methods for Internet Explorer (please note: properties and methods
that apply to IE-only technologies and features are not listed):
Property/Method Type R/W Description
altKey
Boolean R/W True indicates the ALT key is pressed; false indicates it
is not.
button
Integer R/W The mouse button has been clicked for certain mouse
events. Values:
0 – No button is pressed.
1 – Left button is pressed.
2 – Right button is pressed.
3 – Left and right buttons are both pressed.
4 – Middle button is pressed.
5 – Left and middle buttons are both pressed.
6 – Right and middle buttons are both pressed.
7 – Left, middle, and right buttons are all pressed.
cancelBubble
Boolean R/W The developer sets this to true to stop the bubbling up
of an event.
clientX
Integer R/W The x-coordinate of the mouse pointer within the client
area (excludes toolbars, scrollbars, and so on) when the
event occurs
clientY
Integer R/W The y-coordinate of the mouse pointer within the client
area (excludes toolbars, scrollbars, and so on) when the
event occurs
ctrlKey
Boolean R/W True indicates the CTRL key is pressed; false indicates
it is not.
fromElement
Element R/W The element that the mouse is leaving during some
mouse events
keyCode
Integer R/W For the
keypress
event, indicates the Unicode charac-
ter of the key that was pressed; for the
keydown
/
keyup
events, numeric indicator as to the key that was
pressed.
offsetX
Integer R/W The x-coordinate of the mouse pointer relative to the
object that caused the event
offsetY
Integer R/W The y-coordinate of the mouse pointer relative to the
object that caused the event
repeat
Boolean R
True if the
keydown
event is being fired repeatedly;
false if not
Table continued on following page
271
All about Events
12_579088 ch09.qxd 3/28/05 11:39 AM Page 271
Free JavaScript Editor
Ajax Editor
©
→