<%
for i=1 to rs.recordcount
a=rs("isgood")
%>
<input type="checkbox" name="id" <%if a<>0 then response.write "checked"%>>
<%next%>你的意思是这样的吗?
for i=1 to rs.recordcount
a=rs("isgood")
%>
<input type="checkbox" name="id" <%if a<>0 then response.write "checked"%>>
<%next%>你的意思是这样的吗?
如果不要文本框那就更好了,只用一个复选框能实现最好了。谢谢
用同名的复选框,选好以后提交,提交后可以得到一个数组(request("checkboxname")),里面有每一个复选框的选择结果,用循环遍历一下就ok了。
生成复选框的时候也很简单的,遍历所有的数据记录,是一的选上,不是的就不选,就用 king_shadow天才混混 的代码就可以了。
第1点
dim checklist,chck
checklist=split(request.form("checkboxname"),",")
for each chck in checklist
插入或修改数据库记录,值为each
next