JS JQUERY实现滚动条自动滚到底的方法

Posted 佟舟

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JS JQUERY实现滚动条自动滚到底的方法相关的知识,希望对你有一定的参考价值。

 

$(function(){

  var h = $(document).height()-$(window).height();

  $(document).scrollTop(h);

});

 

\

 

 

window.onload = function(){

  var h = document.documentElement.scrollHeight || document.body.scrollHeight;

  window.scrollTo(h,h);

}

 

以上是关于JS JQUERY实现滚动条自动滚到底的方法的主要内容,如果未能解决你的问题,请参考以下文章