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

}

 

posted @ 2017-06-01 15:22  佟舟  阅读(5316)  评论(0编辑  收藏  举报