HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The onmousedown attribute fires when a mouse button is pressed down on the element."
The onmousedown attribute fires when a mouse button is pressed down on the element.
The order of events related to the onmousedown event (for the right mouse button):
The onmousedown attribute is part of the Event Attributes, and can be used on any HTML elements.
Elements | Event |
---|---|
All HTML elements | onmousedown |
Execute a JavaScript when pressing a mouse button over a paragraph:
<p onmousedown="mouseDown()">Click the text!</p>
Event Attribute | |||||
---|---|---|---|---|---|
onmousedown | Yes | Yes | Yes | Yes | Yes |