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

时间:2021-05-06 05:50:01

 

$(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);

}