javascript mousedown event listener code example
Example 1: javascript mousedown mouseup
<p id="myP" onmousedown="mouseDown()" onmouseup="mouseUp()">
<script>
function mouseDown() {
}
function mouseUp() {
}
</script>
Example 2: add mousedown event listener javascript
object.addEventListener("mousedown", myScript);