XForms - MDC, Categories - MDC, Web Development - MDC, Category:CSS:Getting Started - MDC, Category:Localization - MDC, Login required to edit - Edit - MDC, MDC:Site support - MDC, Category:Security - MDC, XUL Tutorial:Manifest Files - MDC, Main Page - MDC

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

  • lines is the number of lines to scroll the document by.
  • lines may 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.

Retrieved from "http://developer.mozilla.org/en/docs/DOM:window.scrollByLines"