July 19, 2001 - The Event Object Properties
July 19, 2001 The Event Object Properties Tips: July 2001
Yehuda Shiran, Ph.D.
|
onmousewheel
. The onmousewheel
event is triggered when the user rotates the wheel button. The event
object can be queried to find all the event's properties. Only the onmousewheel
event exposes the wheelDelta
property. The other properties are standard for all types of event. Here are all the event's properties:
wheelDelta
. Retrieves the distance and direction the wheel button's rotation.
cancelBubble
. Sets or retrieves whether the current event should bubble up the hierarchy of event handlers.
clientX
. Retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
clientY
. Retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
ctrlKey
. Retrieves the state of the CTRL key.
offsetX
. Retrieves the x-coordinate of the mouse pointer's position relative to the object firing the event.
offsetY
. Retrieves the y-coordinate of the mouse pointer's position relative to the object firing the event.
screenX
. Retrieves the x-coordinate of the mouse pointer's position relative to the user's screen.
screenY
. Retrieves the y-coordinate of the mouse pointer's position relative to the user's screen.
shiftKey
. Retrieves the state of the SHIFT key.
srcElement
. Retrieves the object that fired the event.
type Retrieves the event name from the event object.
x
. Retrieves the x-coordinate of the mouse pointer's position relative to the parent element.
y
. Retrieves the y-coordinate of the mouse pointer's position relative to the parent element.