日期:2014-05-17  浏览次数:20881 次

大家来看看这段代码错在哪里啊?弄了好多天了,就是找不出来
<%
Dim   strIdList,arrIdList,iId,i
strIdList   =   Trim(Request( "news "))     '复选框提交的信息,值是数据表字段名
If   Not   IsEmpty(strIdList)   Then
arrIdList   =   Split(strIdList, ", ")
For   i=0   To   UBound(arrIdList)
iId   =   arrIdList(i)
rs( " "&iId& " ")=true       '其中 "&iId& "为数据表字段,数据表字段是动态添加的
Next
End   If
%>

这段代码为什么不能循环存值,每次只能存取一个!数据表的字段是动态添加的,复选框也是动态添加的,每个复选框的值是字段名!拜求各位大虾了!


------解决方案--------------------
arrIdList = Split(strIdList, ", ")
这样呢?加个空格?
或者这样循环
For i = 1 To Request( "news ").Count
'取值 Request( "news ")(i)
Next