Coordinates of the cursor : Cursor « Development « JavaScript DHTML






Coordinates of the cursor


<html>
<head>
<script type="text/javascript">
function show_coords(event){
    alert("X coords: " + event.clientX + ", Y coords: " + event.clientY)
}
</script>
</head>

<body onmousedown="show_coords(event)">
<p>Click in the document. </p>
</body>

</html>



           
       








Related examples in the same category

1.Hand, help and wait cursor
2.Coordinates of the cursor relative to the screen