References

Collection of references for web development.

HTML onmousedown event

Description

Execute JavaScript code when the user holds down the mouse button on the element.

Example

<div onmousedown="this.style.backgroundColor = 'orange'">Click me!</div>