JavaScript Window method: scroll()
[this page | pdf | back links]
The scroll() method (when applied to Window
objects in the JavaScript
BOM) scrolls the
document to specified coordinates. It is depreciated (replaced by the scrollTo()
method)
It
has the following syntax with the following parameters. It does not return a
value.
window.scroll(x, y)
|
Parameter
|
Required / Optional
|
Description
|
|
x
|
Required
|
Number of pixels to scroll
to, along horizontal axis
|
|
y
|
Required
|
Number of pixels to
scroll to, along vertical axis
|
NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)