在我的聊天脚本中,以下行发生错误:
$("#chatbox_"+chatboxtitle+" .chatboxcontent")
.scrollTop($("#chatbox_"+chatboxtitle+" .chatboxcontent")[0].scrollHeight);
setTimeout('$("#chatbox_"+chatboxtitle+" .chatboxcontent")
.scrollTop($("#chatbox_"+chatboxtitle+" .chatboxcontent")[0].scrollHeight);', 100);
答案 0 :(得分:0)
试试这个
setTimeout(function () {
$("#chatbox_"+chatboxtitle+" .chatboxcontent")
.scrollTop($("#chatbox_"+chatboxtitle+" .chatboxcontent")[0].scrollHeight);
}, 100);