var doc = document,win = window;var    $ScrollBotto;
            if($(win).scrollTop() > 0)
                $ScrollBottom = $(doc).height() - $(win).height() + $(win).scrollTop();
            else
                $ScrollBottom = $(doc).height() - $(win).height() - $(win).scrollTop();
      回到底部      $('html, body').animate({'scrollTop':$ScrollBottom})

 

      回到顶部    $('html, body').animate({'scrollTop':0})

相关文章:

  • 2021-08-09
  • 2021-11-02
  • 2022-12-23
  • 2021-07-21
  • 2021-10-12
  • 2021-06-05
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案