标题:ASP考试系统问题!
只看楼主
whp200778
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2009-10-17
结帖率:0
已结贴  问题点数:20 回复次数:2 
ASP考试系统问题!
大家好,我想问个ASP考试系统的问题,在做题页面做完题,点提交,进入评分界面,如何将做错的题目显示出来?现在我做的只是显示出做错题的答案,不能显示出错题,请大家帮帮我!可以给我写写代码,谢谢
以下是评分界面的代码:(数据库中题目存放的字段是TRY_SUBJECT)
<!--#include file="include/conn.asp"-->
<!--#include file="safe.asp" -->
<%
if Session("stuFlag")<>1 then
    server.Transfer("default.asp")
end if
%>
<html>
<head>
<title>::::欢迎光临在线考试系统:::::</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META content=fixty设计 name=description>
<META content="fixty@ name=author>
<link href="css/Style.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="49" height="35" background="images/HOME_BG3.GIF">&nbsp;</td>
    <td height="35" background="images/HOME_BG9.GIF"> <div align="center"><span class="Xsmall"><font color="#FF0000">恭喜你完成本次考试任务</font></span></div></td>
    <td width="13" height="1"><img src="images/home_bg8.gif" width="13" height="35"></td>
  </tr>
  <tr>
    <td width="49" background="images/HOME_BG1.GIF"> <br> </td>
    <td background="images/home_bg10.gif">
     <blockquote class="Xsmall">
          <%
dim PD_TJ(40),XZ_TJ(60),PD_FS,PD_DA(40),XZ_DA(60)
PD_FS = 0
XZ_FS = 0
response.write(Session("NameT_Stu")&"你好,本次考试你的情况如下:<br><br>")
response.Write "<font color = #ff0000>★ 判定题中做错的有:</font><br><br>"
for d1 = 1 to 40
PD_TJ(d1) = request("PD"&d1)
PD_DA(d1) = request("PD_DA"&d1)
if PD_TJ(d1) = "" then PD_TJ(d1) = "D"
if PD_TJ(d1)=PD_DA(d1) then
PD_FS = PD_FS + 1
else
response.Write "<font color = ff0000>"&d1&"</font>题 答案是"&PD_DA(d1)&" | "
end if
next
response.Write "<br><font color = 0000ff>判断题:"&PD_FS&"分<br></font>"
response.Write "<br><font color = ff0000>★ 选择题中做错的有:</font><br><br>"
for d2 = 1 to 60
XZ_TJ(d2) = request("XZ"&d2)
XZ_DA(d2) = request("XZ_DA"&d2)
if XZ_TJ(d2) = "" then XZ_TJ(d2) = "D"
if XZ_TJ(d2)=XZ_DA(d2) then
XZ_FS = XZ_FS + 1
else
response.Write "<font color = ff0000>"&d2&"</font>题错,正确答案是"&XZ_DA(d2)&" | "
end if
next
response.Write "<br><font color = 0000ff>选择题:"&XZ_FS&"分</font>"
response.Write("<br><font color = 0000ff>总得分:"&XZ_FS+PD_FS&"分</font>")
%>
     </blockquote></td>
    <td width="13" background="images/home_bg7.gif">&nbsp;</td>
  </tr>
  <tr>
    <td width="49" height="42" background="images/HOME_BG2.GIF">&nbsp;</td>
    <td height="22" background="images/home_bg10.gif" bgcolor="#FFFFFF" class="Xsmall"><div align="center"><a href="javascript:window.close()">[关闭窗口]</a></div></td>
    <td width="13" height="22" background="images/HOME_BG7.GIF">&nbsp;</td>
  </tr>
  <tr>
    <td height="12" background="images/HOME_BG4.GIF">&nbsp;</td>
    <td background="images/HOME_BG5.gif">&nbsp;</td>
    <td background="images/HOME_BG6.GIF">&nbsp;</td>
  </tr>
</table>
</body>
</html>
搜索更多相关主题的帖子: 系统 考试 ASP 
2009-10-17 23:02
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
得分:20 
提交时同时提交题目id 然后写个function在那边页面通过id显示题目
2009-10-18 08:56
whp200778
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2009-10-17
得分:0 
回复 2楼 aspic
如何写啊?可以教教我么?帮我写写好么?
2009-10-18 12:52



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-288946-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.185701 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved