snippet library logo
The Best Html Forum Around
in category
Javascript / Misc. / Position of cursor
Snippet details
ID: 73
Viewed: 1418
Added: 2002-02-06
Version:
View Demo

User Rated at: 2 Stars
Rate This:
Snippets in this catagory         
Show Printable Version
to get the relative position (x,y) of the cursor on the screen.

General Details
Snippet uploaded by: snippet
Email : webmaster@snippetlibrary.com
Snippet By: Jon Hanlon

<!---Head--->
<html> 
<head> 
<script language="Javascript"> 
function findMouse() { 
divXY.innerText="The mouse is at (" + event.clientX + " , " 
+ event.clientY + ")"; 

</script> 
</head>

<!---Body--->


 
<body onmousemove="findMouse()"> 
<h1>Mouse Around</h1> 

<div id="divXY">Move the mouse</div> 
<br> 

</body> 
</html>




No Reviews to show


Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Subject:

Reviewed By:

Write a review:





Terms of Conditions
Powered By
Avian Hosting
© 2005 snippetlibrary.com All Rights Reserved.