spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column10


New Mouse Events

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management

A mouse event occurs when you move the mouse or click the left mouse button. When a mouse event occurs, the event object's button property indicates which mouse button (if any) is down.

A dblclick event occurs when the user double clicks an element. In other words, it occurs when the elapsed time between two consecutive onclick events is within a system-defined range. A dblclick event actually occurs at the end of the following sequence:

  1. mousedown
  2. mouseup
  3. click
  4. mouseup
  5. dblclick

You may recall from Column 9 that the click event compiles two separate events: mousedown and mouseup. However, when you press the Enter key on a focusable element, such as a button, a click event occurs without a preceding mouseup event.

Note that for mice with only one button, the button is considered the left mouse button.

The mouseout and mouseover events fire when the mouse cursor moves from one element on the page to another. The event object's fromElement and toElement reflect the element object that the mouse cursor is coming from and going to.

When moving between elements, the first event to fire is mouseout. It is initiated when the mouse cursor leaves the original element. The next event to occur is mousemove, indicating that the mouse cursor has moved. Finally, mouseover fires, indicating that the mouse cursor has entered the new element.

http://www.internet.com

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

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

webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags


Created: December 30, 1997
Revised: December 30, 1997

URL: http://www.webreference.com/js/column10/newmouseevents.html