万紫千红是什么树:高手帮我看一下ASP代码,有没有错误

来源:百度文库 编辑:杭州交通信息网 时间:2024/03/29 10:30:06
Dim category_type1, category_type2
category_type1 = Request.Querystring("type1")
category_type2 = Request.Querystring("type2")

Dim i
For i=1 To 3
If i = category_type1 Then
Response.Write "<option value='"&i&"' selected>"&category1_name(i)&"</option>"
Else
Response.Write "<option value='"&i&"'>"&category1_name(i)&"</option>"
End If
Next

上面的category_type1, category1_name(i) 这些变量我都能在此页接受,可就是在 If 判断语句那里判断不了,i = category_type1 这里分明是两个直一样,可判断结果为不一制,都郁闷死我了.哪为高手帮我解决一下~谢谢

哈哈...
if i = category_type1 改成

if i-category_type1 =0 看看.
估计是类型的问题.用减法强制转成数字.