📌  相关文章
📜  javascript 底部自动滚动 - Javascript 代码示例

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

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

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