DOM:window.escape - MDC, Related changes - MDC, Extensions - MDC, nsIComponentManager - MDC, Gecko DOM Reference:Introduction - History - MDC, DOM:window.unescape - MDC, Accessibility - History - MDC, Sandbox:non-redirect test - MDC, DOM:window.setTimeout - MDC, Category:CSS2 Quick Reference - MDC

DOM:window.scrollBy

From MDC

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

� Previous diff
Revision as of 12:35, 7 July 2006
Jabez (Talk | contribs)
Syntax
Next diff →
Line 4: Line 4:
Scrolls the document in the window by the given amount. Scrolls the document in the window by the given amount.
==Syntax == ==Syntax ==
- window.scrollBy(''xDelta'', ''yDelta'') + window.scrollBy(''X'',''Y'')
 + 
==Parameters == ==Parameters ==
*<code>xDelta</code> is the amount of pixels to scroll horizontally. *<code>xDelta</code> is the amount of pixels to scroll horizontally.

Revision as of 12:35, 7 July 2006

« Gecko DOM Reference

Contents

Summary

Scrolls the document in the window by the given amount.

Syntax

window.scrollBy(X,Y)

Parameters

  • xDelta is the amount of pixels to scroll horizontally.
  • yDelta is the amount of pixels to scroll vertically.

Example

// scroll one page 
window.scrollBy(0, window.innerHeight);

Notes

window.scrollBy scrolls by a particular amount where window.scroll scrolls to an absolute position in the document. See also window.scrollByLines, window.scrollByPages

Specification

DOM Level 0. Not part of specification.

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