August 1999
Intermediate to advanced
1488 pages
72h 53m
English
event.pageX
The pageX property of the Event object controls the horizontal (x-coordinate) positioning within a Web page in which the event occurred.
Listing 7.209 shows an example of how you can find the x-coordinate positioning of where the click event occurred within the browser. Simply click in the browser window and an alert box will appear indicating the value of the x-coordinate of where the mouse was clicked.
<html> <head> <title>Example of the event.pageX property</title> </head> <body> <script language = "JavaScript"> <!--Hide // sets up the window to capture CLICK events window.captureEvents(Event.CLICK); // function ... |
Read now
Unlock full access