Provides information for a Mouse-related event.
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome | ||
|---|---|---|---|---|---|---|---|---|---|
|
MouseEvent Constructor() : MouseEvent
Provides information for a Mouse-related event.
|
Show Details | ||||||||
MouseEvent() : MouseEventProvides information for a Mouse-related event. Returns
|
|||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome |
|---|---|---|---|---|---|---|---|
|
altKey
: Boolean
If true, indicates that the user pressed the "Alt" key while the event occurred.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | no | 1.0+ | no |
|
|||||||
|
button
: Number
Specifies which mouse button was clicked or released during a mousedown, mouseup, or click event.
|
Show Details | 5.0+ | 1.75+ | 6.0+ | 8.0+ | 1.2+ | no |
|
|||||||
|
clientX
: Number
Horizontal (x) coordinate of the mouse pointer in the window.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
clientY
: Number
Vertical (y) coordinate of the mouse pointer in the window.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
ctrlKey
: Boolean
If true, indicates that the user pressed the "Ctrl" key while the event occurred.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
metaKey
: Boolean
If true, indicates that the user pressed the "Meta" key while the event occurred.
|
Show Details | no | 1.75+ | no | no | 1.0+ | no |
|
|||||||
|
relatedTarget
: EventTarget
Node related to the target node for the event.
|
Show Details | no | 1.0+ | no | 7.0+ | 1.0+ | no |
|
|||||||
|
screenX
: Number
Horizontal (x) coordinate of the mouse pointer relative to the upper-left corner of the client screen.
|
Show Details | 5.0+ | 1.75+ | 6.0+ | 8.0+ | 1.2+ | no |
|
|||||||
|
screenY
: Number
Vertical (y) coordinate of the mouse pointer relative to the upper-left corner of the client screen.
|
Show Details | 5.0+ | 1.75+ | 6.0+ | 8.0+ | 1.2+ | no |
|
|||||||
|
shiftKey
: Boolean
If true, indicates that the user pressed the "Shift" key while the event occurred.
|
Show Details | 5.0+ | 1.75+ | 6.0+ | 8.0+ | 1.2+ | no |
|
|||||||
Functions
| Method | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome | ||
|---|---|---|---|---|---|---|---|---|---|
|
initMouseEvent() : void
Sets the initial property values for a new MouseEvent object.
|
Show Details | no | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no | ||
|
Returns
|
|||||||||
References
Availability
HTML DOM Level 2|W3C