window.scrollByPages

書式

scrollByPages(ページ数)
window.scrollByPages(ページ数)

説明

指定されたページ数だけスクロールさせます。このプロパティはFirefoxで利用することができます。

サンプルコード [実行]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<script type="text/javascript"><!--
function winScroll() {
window.scrollByPages(2);
}
// --></script>
</head>
<body>
<form>
<input type="button" value="Scroll" onClick="winScroll()">
</form>
<div style="width:1000px;height:3000px;background-image:url(sky.jpg)"><img src="sky.jpg"></div>
</body>
</html>