window.scrollByLines

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

構文

scrollByLines(行数)
window.scrollByLines(行数)

例文

<html>
 <head>
  <title>window.scrollByLines</title>
  <script type="text/javascript"><!--
   function winScroll() {
    window.scrollByLines(5);
   }
  // --></script>
 </head>
 <body>
 <form>
  <input type="button" value="Scroll" onClick="winScroll()">
 </form>
 <div style="width:1000px;height:1000px;background-image:url(sky.jpg)"><img src="sky.jpg"></div>
 </body>
</html>

関連記事

スポンサーリンク

CASE演算子 値の変換

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る