会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
独醉笑清风
有些话,说再多也没用。有些事,只有自己懂。
博客园
首页
新随笔
联系
订阅
管理
【分享】将滚动条保持在最底部的方法
//box-container是添加overflow的父div,也就是出现滚动条的div
var scrollTarget =
document.getElementById(
"box-container");
//scrollTarget.scrollHeight是获取dom元素的高度,然后设置scrollTop
scrollTarget.scrollTop=scrollTarget.scrollHeight;
posted on
2019-08-22 09:51
独醉笑清风
阅读(
944
) 评论(
0
)
编辑
收藏
举报
刷新页面
返回顶部