August 1999
Intermediate to advanced
1488 pages
72h 53m
English
window.scrollTo(numX, numY)
The scrollTo() method of the Window object scrolls the specified window to the specified location passed to the method. As shown in the syntax definition, the first numeric value passed to the method represents the x-coordinate to which you want to scroll the window, while the second numeric value represents the y-coordinate.
Listing 7.581 has two text fields and a button. If the user enters an integer value in each of the text fields and clicks the button, the window will be scrolled to those settings.
<html> <head> <script language="JavaScript1.2"> <!-- Hide ... |
Read now
Unlock full access