Element: mousedown event

The mousedown event is fired at an Element when a pointing device button is pressed while the pointer is inside the element.

Note: This differs from the click event in that click is fired after a full click action occurs; that is, the mouse button is pressed and released while the pointer remains inside the same element. mousedown is fired the moment the button is initially pressed.

Bubbles Yes
Cancelable Yes
Interface MouseEvent
Event handler property onmousedown

Examples

See mousemove_event for example code.

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
mousedown_event
2
12
6
9
11.6
4
≤37
18
6
12.1
3.2
1.0

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Element/mousedown_event