Window.scrollByPages()

非標準: この機能は標準ではなく、標準化の予定もありません。公開されているウェブサイトには使用しないでください。ユーザーによっては使用できないことがあります。実装ごとに大きな差があることもあり、将来は振る舞いが変わるかもしれません。

Window.scrollByPages() メソッドは、現在の文書を指定されたページ数だけスクロールさせます。

概要

js
window.scrollByPages(pages);

引数

  • pages はスクロールさせるページ数です。正または負の整数を指定することができます。

js
// 文書を下へ 1 ページスクロール
window.scrollByPages(1);

// 文書を上へ 1 ページスクロール
window.scrollByPages(-1);

仕様書

DOM Level 0 です。仕様書にはありません。

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
scrollByPages
Non-standard

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.

関連情報