Javascript Reference
Categories: onmousedown

javascript onmousedown Description

@Aug. 15, 2009, 12:13 p.m.
onmousedown, onmouseup Firefox/Netscape/NN 4 IE 4 Chrome/Safari/DOM 2  

 

Bubbles: Yes; Cancelable: Yes  

Fires when the user presses down (onmousedown) or releases (onmouseup) a mouse button. Events related to mouse click actions fire in this order: onmousedown, onmouseup, and onclick.

 

An event object created from a mouse event has numerous properties filled with details such as coordinates of the click, the mouse button used, and whether any modifier keys were held down during the event. The event handler function can inspect these properties as needed.

 

Note that in Netscape 6, mouse events can fire on child text nodes of container-type elements, meaning that the event object's target property references the node, rather than the element. 

 
Typical Targets

All rendered elements, except in Navigator 4, where the events are limited to button-style input elements, plus a and area elements.


Powered by Linode.