JS控制滚动条自动向下滚动

l28330 63 0 rar 2019-07-09 20:07:44

JS类似BBS控制输入框输入信息后,滚动条自动滚到最下方,始终显示最后输入的一条信息,在做BBS的兄弟,可以参考一下思想

用户评论
请输入评论内容
评分:
Generic placeholder image 卡了网匿名网友 2019-07-09 20:07:44

不是我要用的功能

Generic placeholder image 卡了网匿名网友 2019-07-09 20:07:44

是不错!确实解决问题但为啥要这么多分?就一句话: e.scrollTop=e.scrollHeight; 好黑啊! .

Generic placeholder image 卡了网匿名网友 2019-07-09 20:07:44

不能实现我想要的功能,但是给了我一个思路,谢啦!

Generic placeholder image 卡了网匿名网友 2019-07-09 20:07:44

真的好黑啊,下载前应该先看看评论

Generic placeholder image 卡了网匿名网友 2019-07-09 20:07:44

function sc(){ document.getElementById("messages").scrollTop=document.getElementById("messages").scrollHeight; //document.getElementById("messages").scrollTop = document.getElementById("messages").scrollHeight } setInterval("sc()",2

Generic placeholder image 卡了网匿名网友 2019-07-09 20:07:44

是不错!确实解决问题 但为啥要这么多分?就一句话: e.scrollTop=e.scrollHeight; 好黑啊!