//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编辑  收藏  举报