📜  javascript 向下滚动 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:15.261000             🧑  作者: Mango

代码示例2
const scrollToTop = () => {
  const scrollTopButton = document.getElementById('scrollTopButton');

  scrollTopButton.addEventListener('click', () => {
    window.scrollTo(0, document.body.scrollHeight);
  });
};