因结太快,而问题还是没有解决。如何判断值是否存在数组????
1.htm
<form name="form1" method="post" action="e.asp">
<input type="checkbox" name="ab" value="1">
<input type="checkbox" name="ab" value="2">
<input type="checkbox" name="ab" value="3">
<input type="checkbox" name="ab" value="4">
<input type="checkbox" name="ab" value="5">
<input type="submit" name="Submit" value="Submit">
</form>
请问如何 判断 a 是否 在 ab 里面
e.asp
<%
ab =request("ab")
a =2 \\或别的数字
If Then \\怎么写呢???
Response.Write("存在")
Else
Response.Write("不存在")
End If
%>
原来的问题
http://community.csdn.net/Expert/topic/3514/3514679.xml?temp=.9488947
http://community.csdn.net/Expert/topic/3513/3513881.xml?temp=.4926569
以上的回答是有bug 的
<%
ab = request("ab")
a = 1
if instr(1,ab,a)>0 then
response.write "存在"
else
response.write "不存在"
end if
%>
若 e.asp?ab=3&ab=4&ab=5&ab=11111111
也会提示 存在的