Monday, 18 July 2011

View mouse co-ordinates

<script type="text/javascript">
 $(function(){
    $(document).mousemove(function(e){
       $('#status').html(e.pageX +","+ e.pageY); //pageX and pageY gives the x and y co-ordinates
    }); 
 });
</script>

</head>
<body>
    <h2 id="status"></h2>

No comments:

Post a Comment