asp聊天室输出问题
<%
response.buffer=true
on error resume next
%>
<%
if request("request_method")="GET" then
%>
<body bgcolor=lightyellow>
<form method="post" action="chat.asp">
请输入你的昵称:<input type="text" name="nick" size="50">
<input type="submit" value="进入聊天室">
</form>
<%
response.End
else
response.clear
if request("nick")<>"" then
session("nick")=request("nick")
end if
%>
<form method="post" action="chat.asp"><%=session("nick")%>
<input type="text" name="talk">
<input type="submit" value="提交">
</form>
<%
if trim(request("talk"))="" then
talk="他没有说话"
else
talk=trim(request("talk"))
end if
APPlication.lock
APPlication("show")=session("nick")&": "&talk&"<br>"&APPlication("show")
APPlication.unlock
response.write APPlication("show")
end if
%>
每次用用户进入聊天室就会先显示,他什么都没有说,但是用户进入时没说什么啊。为什么会先读出一句呢
答案:是不是设置了 文本框中的默认值
response.write APPlication("show")
有默认值的话,就会每次都提示一次
其他:if trim(request("talk"))<>"" then
talk=trim(request("talk"))
end if
上一个:关于mov R1,R0 这条指令执行后,R0的值?
下一个:写了一段动态扫描显示的汇编程序,谁帮我看下的,