HTML onmousedown Attribute
Example
<p onmousedown="myFunction()">Click me!</p>
Meaning
The onmousedown attribute specifies the script run when a mouse button is pressed down on an element.
Standard Syntax
<element onmousedown="script">
Browser Support
Status
Applies to:
The onmousedown attribute can be used on the following element:
Element | Attribute |
---|---|
All HTML elements. | onmousedown |
Attribute Values
Value | Description |
---|---|
script | Specifies the script to be run on onmousedown |