Advertisement
Home Open Editor ❯

HTML onmousedown event Attribute

Example

<p onmousedown="myFunction()">Click me!</p>

Try this code ❯

Meaning

The onmousedown attribute specifies the script run when a mouse button is pressed down on an element.


Standard Syntax

<element onmousedown="script">


Advertisement

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>
Home Open Editor ❯
Advertisement