The mousedown event occurs when the pointing device button is pressed.
It also occurs when a click occurs
event handler content attribute (ie on HTML attribute
<button class="btn btn-info" onmousedown="console.log('Mouse Down!')" >Click Me</button>
Example of DOM - Event Listener function with the mousedown event.
document.querySelector('button').addEventListener("mousedown", event => {
console.log('Mouse down !');
}
);
<button>Poke me!</button>