spacer
Yehuda Shiran July 19, 2001
The Event Object Properties
Tips: July 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

Internet Explorer 6 supports a new event, 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.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business