New Mouse Events
A mouse event occurs when you move the mouse or click the left mouse button. When a mouse event occurs, the
button property indicates which mouse button (if any) is down.
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:
You may recall from Column 9 that the
click event compiles two separate events:
mouseup. However, when you press the Enter key on a focusable element, such as a button, a
click event occurs without a preceding
Note that for mice with only one button, the button is considered the left mouse button.
mouseover events fire when the mouse cursor moves from one element on the page to another. The
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.
Created: December 30, 1997
Revised: December 30, 1997