asp.net.ph

Skip Navigation Links

onmousedown Event


Fires when the user clicks the object with either mouse button.

Syntax

Inline <element onmousedown = "handler" ... >
Script object.onmousedown = handler

Remarks

Bubbles Yes
Cancels Yes
To invoke Click a mouse button.
Default action Initiates actions associated with the event and with the object being clicked.

A mousedown event occurs when the pointing device button is pressed over an element. The button property can be used to determine which mouse button is pressed.

This event is valid for most elements.

Event Object Properties

While event handlers in the Document Object Model do not receive parameters directly, the handler can query the event object for data.

Event Object Properties


Example

This example shows how the origin of the onmousedown event is determined when event bubbling is used.

Sample Code


See Also

onmousemove, onmouseout, onmouseover, onmouseup


Need a break ?
Suggested Reading

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note