asp.net.ph

onmousedown Event

DHTML Events


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

Syntax

Inline HTML <element onmousedown = "handler" ... > All platforms
Event property object.onmousedown = handler ECMA-262 Language Specification
Named script <script FOR=object EVENT=onmousedown> Internet Explorer® only

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



Contents
HTML Elements
HTML Element Attributes
CSS Properties
DOM Events Reference

Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

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