谁有asp做的聊天系统,,或者帮我看下这个有什么错

来源:百度知道 编辑:UC知道 时间:2024/06/21 09:27:14
<%
mytalk=trim(request.form("putword"))
if mytalk<>""then
application.lock
application("show")="<font color=0000ff size=4>"
request.cookies("cname") & "</font>:" & "<font size=3>"
& mytalk & "</font>" & "<br>" & application("show")
application.unlock
end if
%>
<html>
<head>
<title>欢迎光临小型聊天室</title>
</head>
<body>
<meta http-equiv=Content-Language content=zh-cn>
<pre>
<%=application("show")%>
</pre>
</body>
</html>

给你做了个简单的:
index.asp

<iframe src="b.asp" width="600" height="300" name="ifr"></iframe>
<form action="b.asp" target="ifr" method="post">
<input name="msg" />
<input type="submit" value="发言"/>
</form>

b.asp

<%msg=trim(request.form("msg"))
if msg<>""then
application.lock
application("msg")= application("msg")&msg&"<br />"
application.unlock
end if%>
<HTML>
<HEAD>
<meta http-equiv="Refresh" content="5;url=b.asp">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></HEAD>
<body width="580" height="280">
<%=Application("msg")%>