删除以下代码就行了,你是不是把不该删除的也给删除了
.Write " function getNewMessage()"& vbcrlf
.Write " {"& vbcrlf
.Write " var url = '../user/UserAjax.asp';" & vbCrLf
.Write " var pars = 'Action=GetAdminMessage'" & vbCrLf
.Write " var myAjax = new Ajax.Request(url,{method: 'get', parameters: pars, onComplete: showResponse});" & vbCrLf
.Write " setTimeout('getNewMessage()', 10000);"
.Write " }"
.Write " function showResponse(originalRequest)"
.Write " {"
.Write " $('newmessage').innerHTML=originalRequest.responseText;"
.Write " }"
.Write "setTimeout('getNewMessage()', 1000);"