Create an account or log in - MDC, Category:XPCOM - MDC, DOM:window.scrollByPages - History - MDC, DOM:window.setInterval - MDC, Extensions:Community - MDC, Login required to edit - Edit - MDC, XML - MDC, Firefox 1.5 for developers - History - MDC, Category:XForms - MDC, Login required to edit - Edit - MDC

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

  • 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"