以下の4つのうちの一番大きいものを使って、window.scroll を実行します 1) document.body.clientHeight 2) document.body.scrollHeight 3) document.documentElement.clientHeight 4) document.documentElement.scrollHeight <script> function scrollBottom() { var target = [document.body.clientHeight,document.body.scrollHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight]; var top = Math.max.apply( null, tar
![JS : ページの最後へスクロール( Math.max.apply でページ長さを取得 )](https://cdn-ak-scissors.b.st-hatena.com/image/square/126e9c63960837b5815901e11e1f6c1303c17f2b/height=288;version=1;width=512/https%3A%2F%2Fblog.seesaa.jp%2Fimg%2Fogp_logo.png)