原理是通过获取页面高度滚动到指定位置
document.documentElement.clientHeight; 获取高度,通过scroll滚动到指定位置,代码:
<script>
function rollBottom(){
var t = document.documentElement.clientHeight;
window.scroll({ top: t, left: 0, behavior: 'smooth' });
}
rollBottom();
</script>