Availability: |
| ||||||
Property/method value type: | Boolean primitive | ||||||
JavaScript syntax: | - | myObject.onmousemove = aHandler | |||||
HTML syntax: | <HTMLTag onMouseMove="..."> | ||||||
Argument list: | aHandler | A reference to a function object to handle the event |
When you move the mouse, the browser generates mouse move events and sends them to the Element object that is under the mouse at that moment. As the mouse reaches the boundary of an element a mouse out event and a mouse over event are generated and directed to the appropriate elements for them to handle.
Netscape does not support this event handler on individual elements. You have to use the captureEvents() method that belongs to a window or layer object and then delegate the handling to the handler as you need to.
DOM level 2 classifies this as a MouseEvent and specifies that it uses bubbling propagation and can be canceled.
As a mouse is moved within an element, a large number of mouse move events will be triggered. This can cause problems if your handler carries out a lot of lengthy computation. It can cause severe browser crashing problems if you are creating and destroying objects under the mouse while it is moving.
A
ACRONYM
ADDRESS
Anchor
APPLET
AREA
B
BIG
BLOCKQUOTE
BODY
BUTTON
CAPTION
CENTER
Checkbox
CITE
CODE
DD
DEL
DFN
DIR
DIV
DL
Document
DT
EM
FIELDSET
FileUpload
FONT
FORM
H1
HR
I
IMG
Input
INS
KBD
LABEL
LEGEND
LI
LISTING
MAP
MARQUEE
MENU
OL
P
Password
PLAINTEXT
PRE
Q
RadioButton
ResetButton
S
SAMP
Select
SMALL
SPAN
STRIKE
STRONG
SUB
SubmitButton
SUP
TABLE
TBODY
TD
TEXTAREA
TextCell
TFOOT
TH
THEAD
TR
TT
U
UL
Url
VAR
Prev | Home | Next |
onMouseDrag | Up | onMouseOut |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |