sendMessage:function(){
var _this = this;
var userWords = document.createElement('li');
var ulTag = document.querySelector('.list-box');
userWords.innerHTML = "<div class='contact-box__send'>"+ _this.userMessage +"</div>"
userWords.setAttribute('class','talk users-words contact-box clearfix');
ulTag.appendChild(userWords);
ulTag.scrollTop = ulTag.scrollHeight; //此处不能赋值
console.log(ulTag.scrollTop,ulTag.scrollHeight);
}
我希望达到插入一个元素,内容区域自动滚动到底部
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…