Easy Tutorial
❮ Att Table Border Tag Datalist ❯

HTML onmousedown Event Attribute

HTML Event Attributes

Example

Run a script when a mouse button is pressed:


Browser Support

All major browsers support the onmousedown event attribute.


Definition and Usage

The onmousedown attribute is triggered when a mouse button is pressed.

Tip: The sequence of events associated with the onmousedown event (left/middle mouse button):

The sequence of events associated with the onmousedown event (right mouse button):

Note: The onmousedown attribute cannot be used with the following elements: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.


Differences Between HTML 4.01 and HTML5

None.


Syntax

Attribute Values

Value Description
script Specifies the script to run when the onmousedown event is triggered.

❮ Att Table Border Tag Datalist ❯