错误类型:
Microsoft VBScript 运行时错误 (0x800A01F5)
非法赋值: 'string'
/IISHelp/聊天室2/talking.asp, 第 25 行
-----------------------------------------------
错误行数在源文件的红色字体处,string是蓝色标示的,整个页面能正确显示,但发话点发送后就会显示如上错误,请大家帮我看看怎么才能不出错啊```谢谢了```最后有文件运行出错的解图附件
-----------------------------------------------
源文件如下:
-----------------------------------------------
<html>
<body bgcolor="rgb(230,300,100)">
<%
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")
string="<font color='"&request("color")&"'>"&name&request("face")&"说:"_
&request("content")&"</font><br>"
'发送显示信息
who=request("who")
items=split(application("people"),",")
application.Lock()
'如果聊天对象为所有人
if request("who")=all then
'为每个用户设置聊天内容
for i=0 to ubound(items)-1
application(items(i))=string&application(items(i))
next
'如果聊天对象为某个用户
else
for i=0 to ubound(items)-1
if items(i)=name or irems(i)=who then
'设置聊天内容
application(items(i))=string&application(items(i))
end if
next
end if
application.UnLock()
end if
%>
<%'没有指定action属性值,表示调用自身%>
<form method="post" action="">
<p>
字体颜色
<%'设定字体颜色%>
<select name="color" size=1>
<option value="blue">蓝色</option>
<option value="green">绿色</option>
<option value="yellow">黄色</option>
<option value="red">红色</option>
<option value="gray">灰色</option>
<option value="black">黑色</option>
<option value="white">白色</option>
</select>
<%'聊天内容输入%>
<input type="text" name="content" size="50">
<input type="submit" name="quit" value="提交">
<p>
选择谈话表情
<%'设定谈话表情%>
<select name="face" size=1>
<option value="神采奕奕地">神采奕奕地</option>
<option value="无聊搭闲地">无聊搭闲地</option>
<option value="兴高采烈地">兴高采烈地</option>
<option value="悲哀忧伤地">悲哀忧伤地</option>
<option value="无限深情地">无限深情地</option>
<option value="笑逐言开地">笑逐言开地</option>
<option value="愤怒谴责地">愤怒谴责地</option>
</select>
选择聊天对象
<select name="who" size="1">
<option value="all">全体成员</option>
<%'添充目前在线的用户名
items=split(application("people"),",")
for i=0 to ubound(items)-1
%>
<option value="<%=items(i)%>"><%=items(i)%></option>
<%next%>
</select> <input type="submit" name="quit" value="退出">
<%end if%>
</body>
</html>
[此贴子已经被作者于2006-12-17 16:57:46编辑过]