Window: scrollByPages() method - Web APIs | MDN

Syntax

Parameters

pages

The number of pages to scroll. It may be a positive or negative integer.

Return value

None (undefined).

Examples

js

// scroll down the document by 1 page
window.scrollByPages(1);

// scroll up the document by 1 page
window.scrollByPages(-1);

Specifications

DOM Level 0. Not part of specification.

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.