📅  最后修改于: 2022-03-11 15:01:38.332000             🧑  作者: Mango
const scrollToTop = () => {
const scrollTopButton = document.getElementById('scrollTopButton');
scrollTopButton.addEventListener('click', () => {
window.scrollTo(0, document.body.scrollHeight);
});
};