日期:2014-05-18  浏览次数:20683 次

剩下最后一个问题未解决了,望前辈指点
a.jsp   页面   (从表tiku提取考试题目,都是选择题)

<%@   page   contentType= "text/html;   charset=gb2312 "   language= "java "   import= "java.io.*,java.sql.* "   %>
<jsp:useBean   id= "connBean "   scope= "session "   class= "bean.ConnDB "/>
<jsp:useBean   id= "employ "   class= "bean.employ "   scope= "session "/>  
<%
ResultSet   rs=connBean.executeQuery( "select   *   from   tiku ");
%>
<html>    
    <body>
    <form   name= "form1 "   method= "post "   action= "b.jsp "   target= "_top ">
    <%
int   question_index=1;
int   tmp_questionid=0;
while(rs.next())   {
tmp_questionid=rs.getInt( "id ");
%>
<table   width= "75% "   border= "0 ">
<tr>  
            <td   width= "15% "   align= "left "   valign= "top "> 答案 </td>
            <td   width= "85% "> <%= " <font   color=blue> ( "   +   question_index   +   ") </font>   "   +   rs.getString( "question ")%> (单选题) </td>
        </tr>

<tr>
                    <td>   <input   type= "radio "   name= " <%=tmp_questionid%> "   value= "A "> A </td> <td> <%=rs.getString( "keya ")%> </td> </tr>
  <tr>
                    <td>   <input   type= "radio "   name= " <%=tmp_questionid%> "   value= "B "> B </td> <td> <%=rs.getString( "keyb ")%> </td> </tr>
<tr>
                    <td>   <input   type= "radio "   name= " <%=tmp_questionid%> "   value= "C "> C </td> <td> <%=rs.getString( "keyc ")%> </td> </tr>
<tr>
                    <td>   <input   type= "radio "   name= " <%=tmp_questionid%> "   value= "D "> D </td> <td> <%=rs.getString( "keyd ")%> </td> </tr>
   
            </table> <p> </p>
<%
question_index++;
}  
%>
<p   align= "center ">  
        <input   type= "hidden "   name= "totaltime "   value= "0 ">
        <input   type= "button "   name= "submita "   value= "提交答卷 "     onclick= "JavaScript:subit() ">
    </p>
</form>

怎么在b.jsp   页面实现总分数多少?
(写过,但是总是不行)

sql2000   数据库