Onmousedown events In Java Script

This event occurs when the mouse left key is pressed on some object. This event generates when the mouse key got pressed in onclick event when it is pressed are released then onclick event fires but onmousedown event gets fired when the key is pressed only before releasing the key this event gets fired.
 
Example:
 
<html>

<head>

<title>events </title>

</head>

<body bgcolor=green text=”white” onmousedown=”ff()”>

<h4 align =center> Please click on the web page anywhere you want</h4>

<script>

function ff()

{

alert(“You clicked at : X “+event.screenX+ ” Y: “+event.screenY)

}

</script>

</body>

</html>

Scroll to Top