szabozoltan69

mouse position displayed

Dec 13th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.66 KB | None | 0 0
  1. <div style="display:block;position:fixed; right: 10px; top:11px">
  2. <form name=ee><input name=sd type=text> </input></form>
  3. <!--        Script by hscripts.com          -->
  4. <!--        copyright of HIOX INDIA         -->
  5. <!-- more scripts @ http://www.hscripts.com -->
  6. <script type="text/javascript">
  7. window.onload = init;
  8. function init() {
  9.   if (window.Event) {
  10.     document.captureEvents(Event.MOUSEMOVE);
  11.   }
  12.   document.onmousemove = getXY;
  13. }
  14.  
  15. function getXY(e) {
  16.   x = (window.Event) ? e.pageX : event.clientX;
  17.   y = (window.Event) ? e.pageY : event.clientY;
  18.  
  19.   document.ee.sd.value = (x-14)+":"+(y-118);
  20. }
  21. </script>
  22. <!-- Script by hscripts.com -->
  23. </div>
Advertisement
Add Comment
Please, Sign In to add comment