GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • MDN
  • HTML: Markup language
  • Elements
  • Global attributes
  • Attributes
  • See all…
  • Responsive images
  • HTML cheatsheet
  • Date & time formats
  • See all…
  • SVG
  • MathML
  • XML
  • CSS: Styling language

This view

  • Original page
  • New address

GeezerVison is showing developer.mozilla.org — Element: mousedown event - Web APIs | MDN

Element: mousedown event

Baseline
Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

  • See full compatibility
  • Learn more

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

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.

This behavior is different from pointerdown events. When using a physical mouse, mousedown events fire whenever any button on a mouse is pressed down. pointerdown events fire only upon the first button press; subsequent button presses don't fire pointerdown events.

Syntax

Use the event name in addEventListener():

js
addEventListener("mousedown", (event) => { })

Alternatively, assign to the event handler property of the interface:

js
onmousedown = (event) => { }

Event type

A MouseEvent. Inherits from UIEvent and Event.

Examples

See mousemove event for example code.

Specifications

Specification
Pointer Events
# mousedown
HTML
# handler-onmousedown

Browser compatibility

See also

  • Learn: Introduction to events
  • mouseup
  • mousemove
  • click
  • dblclick
  • mouseover
  • mouseout
  • mouseenter
  • mouseleave
  • contextmenu
  • pointerdown

Help improve MDN

Learn how to contribute

This page was last modified on Oct 26, 2026 by MDN contributors.

View this page on GitHub • Report a problem with this content
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.