程序代码:<%
Response.Buffer=true
On error resume next
If Request.ServerVariables("Request_Method")="GET" then
%>
<form method="POST"action="chat.asp"><p>
<input type="text" name="nick" size="20" value="nick" style="background-color: rgb(192,192,192)"><br>
<input type="submit" value=" 进入聊天室 " name="B1" style="color: rgb(255,255,0); font-size: 9pt; background-color: rgb(0,128,128)">
</p>
<p><input type="hidden" name="log" size="20" value="1"><br></p>
</form>
<%
Response.End
Else
Response.clear
dim talk
If Request.Form("nick")<>"" then
Session("nick")=Request.Form("nick")
End If
%>
<form method="POST" action="chat.asp" name=form1><p>
<%=Session("nick")%>说话:<input type="text" name="talk" size="50">
<br>
<input type="submit" value=" 提交 " name="B1">
<input type="reset" value=" 取消 " name="B2"></p>
</form>
<A HREF="/asptest/shusheng/chat.asp">离开 </a><br><br>
<%
If Request.Form("log")<>1 then
If trim(Request.Form("talk"))="" then
talk=Session("nick")&" 沉默是金。"
Else
talk=trim(Request.Form("talk"))
End If
Application.lock
Application("show")="< table border=\'0\' cellpadding=\'0\' cellspacing=\'0\' width=\'85%\' >< tr>< td width=\'100%\' bgcolor=\'#C0C0C0\'>< /td>< /tr>< tr>< td width=\'100%\'>< font color=\'#0000FF\'>来自 "&Request.ServerVariables("remote_addr")&" 的 "&Session("nick")&time&" 说:< /font>"&talk&"< /td>< /tr>< tr>< td width=\'100%\' bgcolor=\'#C0C0C0\'>< /td>< /tr>< /table>< br>"&Application("show")
Application.UnLock
Response.Write Application("show")
End If
End If
%>非常不好意思 这样确实可以 而且你那个所谓的vbscript的注释方式确实没有见过 如果那样能正常运行那确实太厉害了









Response.Buffer 即缓冲一ActiveServerPage。回应只到某一页结束或Response.Flush或Response.End方法调用时才发送出去。服务器将输出送给客户端后就不能再设置Buffer属性了。