↑
Main Page
Property/Method Type R/W Description
Property/Method Type R/W Description
returnValue
Boolean R/W The developer sets this to false in order to cancel the
default action for the event.
screenX
Integer R/W The x-coordinate of the mouse pointer relative to the
entire computer screen
screenY
Integer R/W The y-coordinate of the mouse pointer relative to the
entire computer screen
shiftKey
Boolean R/W True indicates the Shift key is pressed; false indicates it
is not.
srcElement
Element R/W The element that caused the event.
toElement
Element R/W The element that the mouse is entering during some
mouse events.
type
String R/W The name of the event.
x
Integer R/W The x-coordinate of the mouse pointer relative to the
parent element of the element that caused the event
y
Integer R/W The y-coordinate of the mouse pointer relative to the
parent element of the element that caused the event
DOM
The DOM event object contains similar core properties and methods with some important differences.
The following table enumerates them.
Property/Method Type R/W Description
altKey
Boolean R/W True indicates the ALT key is pressed; false indicates it
is not.
bubbles
Boolean R
Indicates if the event bubbles.
button
Integer R/W The mouse button that has been pressed 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.
cancelable
Boolean R
Indicates if the event can be cancelled.
cancelBubble
Boolean R
Indicates whether event bubbling has been cancelled
272
Chapter 9
12_579088 ch09.qxd 3/28/05 11:39 AM Page 272
Free JavaScript Editor
Ajax Editor
©
→