DOM:window.scrollByLines
From MDC
« 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