如何让每一个被选择的单选按钮保持被选中的状态?
通常情况下某个单选按钮被选择后就会保持被选中的状态,但是在我这个页面中由于是把多条记录(分属不同类型)列出来,每条记录前放一单选按钮,所以整个页面只能有一个单选按牛保持被选中的状态,而且由于给单选按钮加上了一下语句,连一个被选中的状态都不能显示了,这样我就无法知道哪些被选择了,希望能有一个解决的方法,显示所有记录的代码如下:
<%
While ((Repeat1__numRows <> 0) AND (NOT cate.EOF))
%>
<table width="750" height="80" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td colspan="2" valign="top" bgcolor="#EAEAEA"><%=(cate.Fields.Item("title").Value)%><strong><br>
</strong><%= DoWhiteSpace(cate.Fields.Item("content").Value)%></td>
</tr>
<tr>
<td width="85" valign="top" bgcolor="#CCCCCC"></td>
<td width="645" height="1" valign="top" bgcolor="#CCCCCC"></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF"></td>
<td height="1" valign="top" bgcolor="#FFFFFF"></td>
</tr>
<%
FilterParam=cate.Fields.Item("id").Value
subcate.Filter="stid="&FilterParam
While (NOT subcate.EOF)
%>
<tr>
<td height="10" colspan="2" valign="top" bgcolor="#FAFAFA"></td>
</tr>
<tr>
<td valign="top" bgcolor="#FAFAFA"><div align="right">
<input type="radio" name="id" id="radio<%=(subcate.Fields.Item("id").Value)%>" " value="<%=(subcate.Fields.Item("id").Value)%>" onclick="document.form1.submit();javascript:location='do3.asp'">
</div></td>
<td valign="top" bgcolor="#FAFAFA"><%=(subcate.Fields.Item("subject").Value)%> <font color="#666666"> 试题数
<input name="stid" type="hidden" id="stid" value="<%=(subcate.Fields.Item("stid").Value)%>" size="4">
得分
<input name="score" type="text" id="score" value="<%=(subcate.Fields.Item("score").Value)%>" size="4">
期数
<input name="item" type="text" id="item" value="<%=(subcate.Fields.Item("item").Value)%>" size="4">
类别
<input name="class" type="text" id="class" value="<%=(subcate.Fields.Item("class").Value)%>" size="4">
</font></td>
</tr>
<%
subcate.MoveNext()
Wend
%>
<tr>
<td height="10" colspan="2" valign="top" bgcolor="#FAFAFA"></td>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
cate.MoveNext()
Wend
%>
这里cate是表示试题记录,subcate表示答案记录,cate中的id对应subcate中的stid,通过上面的代码就可以把所有试题和其对应的答案列出来以供人选择,现在的问题就是选中一个一个试题的答案,转到处理页处理后自动返回现在的页面,但做出选择了的那道题的所选答案项前的单选按钮并没有显示被选中的状态,这是怎么回事?