html dom基本操作

//div出滚动条:

<div id="discussion" style="height:500px;overflow:auto;"></div>

//滚动条始终处于最下面。聊天程序需要

$("#discussion").bind('DOMNodeInserted', function(e) {
            this.scrollTop=this.scrollHeight;
 });

 

posted @ 2015-11-09 17:03  小小高  阅读(196)  评论(0编辑  收藏  举报