DOM:window.scrollByLines
From MDC
(Difference between revisions)
| Revision as of 12:58, 7 July 2006 Jabez (Talk | contribs) Example � Previous diff |
Current revision Jabez (Talk | contribs) Parameters |
||
| Line 6: | Line 6: | ||
| window.scrollByLines(''lines'') | window.scrollByLines(''lines'') | ||
| ==Parameters == | ==Parameters == | ||
| - | *<code>lines</code> is the number of lines. | + | *<code>lines</code> is the number of lines to scroll the document by. |
| + | *<code>lines</code> may be a positive or negative integer. | ||
| + | |||
| ==Example == | ==Example == | ||
| // scroll down the document by 5 lines. | // scroll down the document by 5 lines. | ||
Current revision
« Gecko DOM Reference
Contents |
[edit]
Summary
Scrolls the document by the given number of lines.
[edit]
Syntax
window.scrollByLines(lines)
[edit]
Parameters
linesis the number of lines to scroll the document by.linesmay be a positive or negative integer.
[edit]
Example
// scroll down the document by 5 lines. <button onclick="scrollByLines(5);">down 5 lines</button>
// scroll up the document by 5 lines. <button onclick="scrollByLines(-5);">up 5 lines</button>
[edit]
Notes
See also window.scrollBy, window.scrollByPages.
[edit]
Specification
DOM Level 0. Not part of specification.
Categories: Gecko DOM Reference