Event MouseDown (OnMouseDown)

Devtool Chrome Event Listener

About

The mousedown event occurs when the pointing device button is pressed.

It also occurs when a click occurs

Example

OnMouseDown

event handler content attribute (ie on HTML attribute

<button class="btn btn-info" onmousedown="console.log('Mouse Down!')" >Click Me</button>

Mouse Down Event Listener

Example of DOM - Event Listener function with the mousedown event.

  • The Javascript
document.querySelector('button').addEventListener("mousedown", event => { 
        console.log('Mouse down !'); 
}
);
  • The HTML
<button>Poke me!</button>





Discover More
Devtool Chrome Event Listener
DOM - Click Event (OnClick)

1001 ways to handle a the click event. The click event occurs when the pointing device button is clicked over an element. The onclick on attribute may be used with most elements. A click is a mousedown...
Devtool Chrome Event Listener
DOM - Event Type (name)

An event is categorize by its type which is a property of the event object The type of an event is also known as the name of the event (Ref)...
Devtool Chrome Event Listener
How to make the difference between a Swipe/Drag vs Click/Tap event

This article shows you how to make the difference between a swipe/drag and a click/tap event in Javascript.
Card Puncher Data Processing
UI - Overlay

An overlay component is a component that comes above the actual components in a absolute position. In Html, it would have a higher value on the z scale (ie z-index) When two elements overlay each other,...



Share this page:
Follow us:
Task Runner