• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 12. Handling Events > Handling Mouse Events

12.4. Handling Mouse Events

In many previous examples, we've seen uses of the onClick event handler to initiate an action when a user clicks his mouse in a button or on a link. There are a number of other events that can be fired up because of some action of the mouse. When the user moves the mouse pointer over a link, image, or other object, the onMouseOver event handler is triggered, and when he moves the mouse pointer away from an object, the onMouseOut event is triggered. Table 12.4 lists events that are triggered when mouse movement is detected.

Table 12.4. Mouse events.
Event HandlerWhen It Is Triggered
onClickWhen the mouse is clicked on a link and on form objects like button, submit
onDblClickWhen the mouse is double-clicked on a link, document, form object, image
onMouseDown (NN6+)When the mouse is pressed on a link, document
onMouseMove (NN6+)When the mouse touches the link, form object
onMouseOutWhen a mouse is moved out of a link, image map
onMouseOverWhen a mouse is moved over a link, image map
onMouseUpWhen the mouse is released from a link, document



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint