checkbox的一点疑问

提交表单里

1 do while not rs.eof   
1<br/>
1<input =rs("sub_id")="" ```="" name="chknum" type="checkbox" value="```"/>
1=rs("sub_name")
1 rs.movenext   
2loop   

选中几个数字 比如 选中sub_id为“1”“ 2”“ 3”
在处理文件中

1 response.write request("chknum")   
2response.end 

显示1,2,3 为什么一个变量同时有三个数值 我要得到具体的数值进行判断操作怎么办

---------------------------------------------------------------

分离出来:
astrNum = Split(Request("chknum"),",")
For i = 0 To Ubound(astrNum)
Response.Write astrNum(i)
Next

---------------------------------------------------------------

你可设置name的值来提交表单,使之每个都不一样
接受时,用个循环就是了
---------------------------------------------------------------

for i=0 to request.form("chknum").count
response.write request.form("chknum")(i)
next

Published At
Categories with Web编程
Tagged with
comments powered by Disqus