document.documentElement.clientHeight; 获取高度,通过scroll滚动到指定位置,代码: - <script>
- function rollBottom(){
- var t = document.documentElement.clientHeight;
- window.scroll({ top: t, left: 0, behavior: 'smooth' });
- }
- rollBottom();
- </script>
复制代码 文章来源 https://www.yj521.com/article/194.html
|