2013-11-22 59 views
-4

在以下线路发生错误,我的聊天脚本:

$("#chatbox_"+chatboxtitle+" .chatboxcontent") 
.scrollTop($("#chatbox_"+chatboxtitle+" .chatboxcontent")[0].scrollHeight); 
setTimeout('$("#chatbox_"+chatboxtitle+" .chatboxcontent") 
.scrollTop($("#chatbox_"+chatboxtitle+" .chatboxcontent")[0].scrollHeight);', 100); 
+1

'$(...) [0]'是未定义的:错误信息对于什么问题是非常清楚的。'$(“#chatbox _”+ chatboxtitle +“.chatboxcontent”)'的内容是什么? – naththedeveloper

+0

什么是完整未切割错误?这个代码在什么情况下放置?只是这个代码并没有告诉我们很多。 – Oldskool

回答

0

试试这个

setTimeout(function() { 
    $("#chatbox_"+chatboxtitle+" .chatboxcontent") 
    .scrollTop($("#chatbox_"+chatboxtitle+" .chatboxcontent")[0].scrollHeight); 
}, 100); 
+0

我已经尝试此代码,但它无法正常工作 – avinash

+0

显示HTML代码太.. – zzlalani

+0

name);echo $n[0]; ?>')" src="photo; ?>" width="46" height="42" alt="">
name),0,6); ?>
avinash

相关问题