Related changes - MDC, Categories - MDC, Category:Themes:Tools - MDC, Login required to edit - Edit - MDC, XForms - MDC, SVG in Firefox 1.5 - MDC, Login required to edit - Edit - MDC, User:Mgjbot - MDC, Category:JavaScript:Tools - MDC, SVG - MDC

DOM:window.scrollByLines

From MDC

(Difference between revisions)
Revision as of 00:40, 11 August 2005
Dria (Talk | contribs)

� Previous diff
Revision as of 12:58, 7 July 2006
Jabez (Talk | contribs)
Example
Next diff →
Line 8: Line 8:
*<code>lines</code> is the number of lines. *<code>lines</code> is the number of lines.
==Example == ==Example ==
- <button onclick="scrollByLines(10);">jump</button>+ // 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>
 + 
==Notes == ==Notes ==
See also [[window.scrollBy]], [[window.scrollByPages]]. See also [[window.scrollBy]], [[window.scrollByPages]].
==Specification == ==Specification ==
DOM Level 0. Not part of specification. DOM Level 0. Not part of specification.

Revision as of 12:58, 7 July 2006

« Gecko DOM Reference

Contents

Summary

Scrolls the document by the given number of lines.

Syntax

window.scrollByLines(lines) 

Parameters

  • lines is the number of lines.

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>

Notes

See also window.scrollBy, window.scrollByPages.

Specification

DOM Level 0. Not part of specification.

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