asp 循环添加问题

来源:百度知道 编辑:UC知道 时间:2024/06/20 06:30:38
<%

set rs=server.createobject("adodb.recordset")
sql="select * from votes where danxuan=1"
rs.open sql,conn,1,1
do while not rs.eof

%>
<tr>
<th height="30" align="left"><%=rs("sid")%>、<%=rs("title")%>
<input type="checkbox" id="I_100<%=i%>" name="I_100<%=i%>" value="0" onclick="show(100<%=i%>)">
</th>
</tr>
<tr>
<td align="left"><table width="96%" align="center" id="V_100<%=i%>" style="display:none">
<tr>
<input type="radio" name

用表单提交过去就行了
在保存的时候也要用循环

set rs=server.createobject("adodb.recoreset")
rs.open "select * from 表名",conn,1,3
rs.addnew
for i=1 to count '这里的count是你一共有多少个选行

rs("数据库字段")=reques.form("danx"<%=i%>)

next
rs.update
rs.close
set rs=nothing