Click to Move Crosshairs

Shrink screen so you can get scroll bars and test this in a scrolled window.

X,Y=(?,?);

 

 

 

 

    if (e.pageX == null)
    {
       // IE case
       var d= (document.documentElement && 
               document.documentElement.scrollLeft != null) ?
              document.documentElement : document.body;
       docX= e.clientX + d.scrollLeft;
       docY= e.clientY + d.scrollTop;
    }
    else
    {
       // all other browsers
       docX= e.pageX;
       docY= e.pageY;
    }