当然你计算成绩的时候最好写到一个SERVLET中去控制成绩的计算.
<table width="524" border="0" cellpadding="0" cellspacing="0">
<!-------------------------------------------->
<tr>
<td width="520" height="70">
<div align="left">作标记
<input type="checkbox" name="biaoji" value="checkbox" />
<%=i%> .<%=rs.getString("question")%>.(<%=rs.getString("score")%>分)
</div>
</td>
</tr>
<!-------------------------------------------->
<tr>
<td height="43">
<div align="left">
<input type="checkbox" name="answer<%=t%>" value="A" />
A. <%=rs.getString("A")%>
</div></td>
</tr>
<!-------------------------------------------->
<tr>
<td height="43">
<div align="left">
<input type="checkbox" name="answer<%=t%>" value="B" />
B. <%=rs.getString("B")%>
</div>
</td>
</tr>
<!-------------------------------------------->
<%
String C = rs.getString("C");
if(!C.equals("")){
out.println("<tr><td height='43'><div align='left'>"+"<input type='checkbox' name='answer"+t+"' value='C'/>"+" C ."+C+"</div></td></tr>");
}else{
}
String D = rs.getString("D");
if(!D.equals("")){
out.println("<tr><td height='43'><div align='left'>"+"<input type='checkbox' name='answer"+t+"' value='D'/>"+" D ."+D+"</div></td></tr>");
}else{
}
String E = rs.getString("E");
if(!E.equals("")){
out.println("<tr><td height='43'><div align='left'>"+"<input type='checkbox' name='answer"+t+"' value='E'/>"+" E ."+E+"</div></td></tr>");
}else{
}
String F = rs.getString("F");
if(!F.equals("")){
out.println("<tr><td height='43'><div align='left'>"+"<input type='checkbox' name='answer"+t+"' value='F'/>"+" F ."+F+"</div></td></tr>");
}else{
}
%>
<tr>
<td height="43"> </td>
</tr>
</table>
=-------------------------
这是显示多选题的表格,希望你看了能有点收获
[此贴子已经被作者于2006-9-19 11:52:33编辑过]