📌  相关文章
📜  自动滚动到页面底部 js - Javascript 代码示例

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

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

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