这段程序抽取出来的单项选择和多项选择为什么是重复的呢??哪位朋友可怜我一下,帮我看看吧!
<%
rsT.close()
trySql="select * from "&Session("tryT")&" where TRY_TYPE='1'"
rsT.open trySql,Conn',3,2
'判断题
q_num=1
response.write "一. <b>判断题</b><font color=red> 注:每题1分,对的打勾、错的不要打勾</font><br>"
while not rsT.Eof
'response.write(q_num&". "&rsT("TRY_SUBJECT")&"<input name='PdCb'&q_num type='checkbox' id='PdCb' value='1'>"&"<br>")
%>
<input name="<%response.write("PdCb"&q_num)%>" type="checkbox" value="1"> <%response.write(q_num&". "&rsT("TRY_SUBJECT"))%>
<br>
<%
rsT.movenext
q_num=q_num+1
wend
PdNum=q_num-1
Session("Pd_Num")=PdNum
rsT.close
'选择题
response.write("<br>二. <b>单选择</b><font color=red> 注:每题1分,对的打勾、错的不要打勾</font><br>")
trySql="select * from "&Session("tryT")&" where TRY_TYPE='2'"
rsT.open trySql,Conn
q_num=1
while not rsT.Eof
response.write(q_num&". "&rsT("TRY_SUBJECT")&"<br>")
' response.write(" <input type='radio' name='DxRb'&q_num value='1'> A. "&rsT("a")&"<br>"&"<input type='radio' name='DxRb'&q_num value='1'> B. "&rsT("b")&"<br>"&"<input type='radio' name='DxRb'&q_num value='1'> C. "&rsT("c")&"<br>"&"<input type='radio' name='DxRb'&q_num value='1'> D. "&rsT("d")&"<br>")
%>
<input type="radio" name="<%response.write("DxRb"&q_num)%>" value="A"> A. <%=rsT("a")%>
<br><input type="radio" name="<%response.write("DxRb"&q_num)%>" value="B"> B. <%=rsT("b")%>
<br><input type="radio" name="<%response.write("DxRb"&q_num)%>" value="C"> C. <%=rsT("c")%>
<br><input type="radio" name="<%response.write("DxRb"&q_num)%>" value="D"> D. <%=rsT("d")%>
<br>
<%
rsT.movenext
q_num=q_num+1
wend
DxNum=q_num-1
Session("Dx_Num")=DxNum
rsT.close
response.write("<br>三. <b>多选择</b><font color=red> 注:每题1分,对的打勾、错的不要打勾</font><br>")
trySql="select * from "&Session("tryT")&" where TRY_TYPE='2'"
rsT.open trySql,Conn
q_num=1
while not rsT.Eof
response.write(q_num&". "&rsT("TRY_SUBJECT")&"<br>")
%>
<input name="<%response.write("DxCb"&q_num)%>" type="checkbox" value="A"> A. <%=rsT("a")%>
<br><input name="<%response.write("DxCb"&q_num)%>" type="checkbox" value="B"> B. <%=rsT("b")%>
<br><input name="<%response.write("DxCb"&q_num)%>" type="checkbox" value="C"> C. <%=rsT("c")%>
<br><input name="<%response.write("DxCb"&q_num)%>" type="checkbox" value="D"> D. <%=rsT("d")%>
<br>
<%
rsT.movenext
q_num=q_num+1
wend
DdxNum=q_num-1
Session("Ddx_Num")=DdxNum
rsT.close
%>