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