请懂asp的帮忙看看我那里写错了!

来源:百度知道 编辑:UC知道 时间:2024/06/10 05:48:21
看我的代码
不知道为什么判断不出
for i=0 to ubound(wen)
if instr(texts,wen(i))>0 then
texts2="<br><font color=#0000FF>"&rs("glbh")&"</font> <font color=#0000FF>"&time()&"</font> <br>  "&znkf2(i)
application("fk")=application("fk")&kid&"|"
exit for
end if
next

if texts2="" then
texts2="<br><font color=#0000FF>"&rs("glbh")&"</font> <font color=blue>"&time()&"</font> <br>  智能客服系统无法回答此问题,请输入下面问题提问:"&znkf1(0)
application("fk")=application("fk")&kid&"|"
end if

end if
end if
end if
rs.close
这个地方根本无法判断,为什么呢

if texts2="" then
texts2="<br><font color=#0000FF>"&rs("glbh")&"</font> <font color=blue>

没看明白,你把设置字体颜色这些东西都赋给text2了,瞧着很乱,谁教你这么用的?
另外想知道问题出在哪就打中断Trace,很简单的一句话
response.write "<script>alert('test x')</script>"
在警告内容中写上一些信息,然后放在一些关键的节点上,就知道程序有没有跑到那边了,比如说你的程序如果像下面这样加上几个中断,根据弹出的警告窗口内容就可以找到问题出在哪了,哪个警告没有弹出就说明它上面那句有问题或者不符合条件。
response.write "<script>alert('test 1')</script>"
if instr(texts,wen(i))>0 then
response.write "<script>alert('test 2')</script>"
texts2="<br><font color=#0000FF>"&rs("glbh")&"</font> <font color=#0000FF>"&time()&"</font> <br> "&znkf2(i)
application("fk")=application("fk")&kid&"|"
response.write "<script>alert('test 3')</script>"
。。。

response.write "<script>alert('test 4')</script>"
if texts2="" then
response.