Cursor Position in status bar

This is a javascript function that will show the current cursor position in the status bar. This java script can be used in any html page.


  • This function will show the current mouse cursor position relative to the browser window.
  • on the status bar.
  • Just copy the code in to your page and enjoy the effect.


Status bar of this page


<!--Script by>
<!-- more scripts @ -->
<script type="text/javascript">
window.onload = init;
function init() {
if (window.Event) {
document.onmousemove = getXY;
function getXY(e) {
x = (window.Event) ? e.pageX : event.clientX;
y = (window.Event) ? e.pageY : event.clientY;
window.status = x+":"+y;
<!-- Script by -->
  • Release Date - 18-07-2005
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to


  • Copy the javascript code into tag of your page.
  • Create the HTML code with the same form fields.
  • <form name=ee>
    <input name=sd type=text>
  • The function getXY(e) will be invoked whenever there is a change in cursor position.
  • Add your code under the comment to fit your requirement.
  • Your web page will show cursor position (relative to browser window size) in the status bar.


Related Scripts

Free Javascript Scripts

Ask Questions

Ask Question