asp radio问题 10
Dimii,Rw,Vca,isql="select*fromS_Voorderbyidasc"setrs=server.CreateObject("ADODB.RECOR...
Dim ii,Rw,Vca,i
sql="select * from S_Vo order by id asc"
set rs=server.CreateObject("ADODB.RECORDSET")
rs.open sql,conn,1,1
ii=0
do while not rs.eof
ii=ii+1
Rw="Zhi_"&rs("id")
Response.Write "<tr><td height='28px;' width='60%'><font color=red>"&ii&"、</font>"&rs("VoteName")&"</td>"
Response.Write"<input name='Vm' type='hidden' value='"&ii&"' />"
Vca=Split(rs("VClass"),"|")
for i=0 to 2
Response.Write("<td align='center'><input type='radio' name='"&Rw&"' value='"&i&"' checked />"&Vca(i)&"</td>")
next
Response.Write "</tr>"
rs.MoveNext
loop
rs.Close
Set rs=Nothing
如何让所有的 radios ,value=0的默认选中啊 展开
sql="select * from S_Vo order by id asc"
set rs=server.CreateObject("ADODB.RECORDSET")
rs.open sql,conn,1,1
ii=0
do while not rs.eof
ii=ii+1
Rw="Zhi_"&rs("id")
Response.Write "<tr><td height='28px;' width='60%'><font color=red>"&ii&"、</font>"&rs("VoteName")&"</td>"
Response.Write"<input name='Vm' type='hidden' value='"&ii&"' />"
Vca=Split(rs("VClass"),"|")
for i=0 to 2
Response.Write("<td align='center'><input type='radio' name='"&Rw&"' value='"&i&"' checked />"&Vca(i)&"</td>")
next
Response.Write "</tr>"
rs.MoveNext
loop
rs.Close
Set rs=Nothing
如何让所有的 radios ,value=0的默认选中啊 展开
展开全部
Dim ii,Rw,Vca,i
sql="select * from S_Vo order by id asc"
set rs=server.CreateObject("ADODB.RECORDSET")
rs.open sql,conn,1,1
ii=0
do while not rs.eof
ii=ii+1
Rw="Zhi_"&rs("id")
Response.Write "<tr><td height='28px;' width='60%'><font color=red>"&ii&"、</font>"&rs("VoteName")&"</td>"
Response.Write"<input name='Vm' type='hidden' value='"&ii&"' />"
Vca=Split(rs("VClass"),"|")
for i=0 to 2
%>
<td align='center'><input type='radio' name='<%=Rw%>' value='<%=i%>' <%if i=0 then%> checked <%end if%>/><%=Vca(i)%></td>
<%
next
Response.Write "</tr>"
rs.MoveNext
loop
rs.Close
Set rs=Nothing
sql="select * from S_Vo order by id asc"
set rs=server.CreateObject("ADODB.RECORDSET")
rs.open sql,conn,1,1
ii=0
do while not rs.eof
ii=ii+1
Rw="Zhi_"&rs("id")
Response.Write "<tr><td height='28px;' width='60%'><font color=red>"&ii&"、</font>"&rs("VoteName")&"</td>"
Response.Write"<input name='Vm' type='hidden' value='"&ii&"' />"
Vca=Split(rs("VClass"),"|")
for i=0 to 2
%>
<td align='center'><input type='radio' name='<%=Rw%>' value='<%=i%>' <%if i=0 then%> checked <%end if%>/><%=Vca(i)%></td>
<%
next
Response.Write "</tr>"
rs.MoveNext
loop
rs.Close
Set rs=Nothing
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询