quit=Request("Quit") '如果用户选择退出 if quit="退出" then name=session("name") items=split(application("people"),",") Application.Lock application("people")=" " for i=1 to ubound(items)-1 if items(i)<>name then application("people")=application("people")&items(i)&"," end if next application(name)=" " Application.UnLock session.Abandon Response.End else if Request("content")<>" " then '构造显示信息 name=session("name") strig=""_ &name&request("face")&"说:"&request("content")&"" '发送消息 who=request("who") items=split(application("people"),",") Application.Lock '如果聊天对象为所有人 if Request("who")=all then '为每个用户设置聊天内容 for i=0 to ubound(items)-1 application(items(i))=strig&application(items(i)) next '如果聊天对象为某人 else for i=0 to ubound(items)-1 if items(i)=name or items(i)=who then '设置聊天内容 Application(items(i))=strig&Application(items(i)) end if next end if Application.UnLock end if