DOM:window.scrollBy
From MDC
(Difference between revisions)
| Revision as of 00:40, 11 August 2005 Dria (Talk | contribs) � Previous diff |
Revision as of 12:35, 7 July 2006 Jabez (Talk | contribs) Syntax Next diff → |
||
| Line 4: | Line 4: | ||
| Scrolls the document in the window by the given amount. | Scrolls the document in the window by the given amount. | ||
| ==Syntax == | ==Syntax == | ||
| - | window.scrollBy(''xDelta'', ''yDelta'') | + | window.scrollBy(''X'',''Y'') |
| + | |||
| ==Parameters == | ==Parameters == | ||
| *<code>xDelta</code> is the amount of pixels to scroll horizontally. | *<code>xDelta</code> is the amount of pixels to scroll horizontally. | ||
Revision as of 12:35, 7 July 2006
« Gecko DOM Reference
Contents |
Summary
Scrolls the document in the window by the given amount.
Syntax
window.scrollBy(X,Y)
Parameters
xDeltais the amount of pixels to scroll horizontally.yDeltais the amount of pixels to scroll vertically.
Example
// scroll one page window.scrollBy(0, window.innerHeight);
Notes
window.scrollBy scrolls by a particular amount where window.scroll scrolls to an absolute position in the document. See also window.scrollByLines, window.scrollByPages
Specification
DOM Level 0. Not part of specification.
Categories: Gecko DOM Reference