HTML onmousedown event Attribute

❮ HTML Event Attributes

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







Attribute Values

Value Description
script Specifies the script to be run on onmousedown



Technical Details

Supported HTML elements:

All HTML elements, EXCEPT: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>
❮ HTML Event Attributes