1、某DIV窗口滚动到顶部:

 

document.getElementById("某DIV的ID").scrollIntoView(true);

 

2、某DIV窗口滚动到底部:

 

document.getElementById("某DIV的ID").scrollIntoView(false);

3、jquery中跳转到顶部

 $('html,body').animate({scrollTop: 0}, 100)

 $('html,body').animate({scrollTop: $('xxx').offset().top}, 100) // 跳转到某点

相关文章:

  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
  • 2021-05-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-29
  • 2021-05-13
相关资源
相似解决方案