<HTML>
<HEAD>
<TITLE>Get Mouse Position on web page Using Java Script</TITLE>
<script>
function get_mouse_position(evt)
{
var explorer=navigator.userAgent.toLowerCase();
if(explorer.indexOf("msie")>-1)//For Internet Explorer
{
document.getElementById('txt').value="X: " + evt.x + " Y: " + evt.y;
}
else//For Firefox
{
document.getElementById('txt').value="X: " + evt.pageX + " Y: " + evt.pageY;
}
}
</script>
</HEAD>
<BODY onMouseMove="get_mouse_position(event)">
Mouse Position: <input id="txt" type="text" name="mouse position"/>
</BODY>
</HTML>