|
November 16, 2000 Computing the Mouse Click Location Tips: November 2000
Yehuda Shiran, Ph.D.
|
|
Some applications require an exact
positioning of the mouse in order to work properly. These mouse coordinates can
be found using the event
object. In Internet Explorer, the x and y coordinates of the mouse are defined
by the clientX
and clientY
properties, respectively. In Netscape Navigator, they are defined by pageX
and pageY,
respectively. This tip is set up to print, upon clicking, the location of the
mouse. Try clicking in this window and you'll see the exact coordinates pop up.
The event handler of this click is as follows:
People who read this tip also read these tips: Look for similar tips by subject: |