我做了一个100道题的考试,但是出现二个问题,急求解决方法

pjynono 2014-08-25 05:09:24
问题一:按自动评分,只能按二次,按多次显示只是“0”;
问题二:按重新测试,要按二次,如果按一次,做的试题不显示成绩。

<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<script language="javascript">
<!--
function scorequiz(form){
  list=0
  if(form.R1.value!=null && form.R1.value=="*"){list=list+25}
  if(form.R2.value!=null && form.R2.value=="*"){list=list+25}
  form.defen.value=eval(list)
}
function clearquiz(form){
  list=0
  form.R1.value="?"
  form.R2.value="?"
  form.defen.value=eval(list)
}
//-->
</script>
<body>

<form method="POST" action="--WEBBOT-SELF--" name="test">
<p>中式面点师网上考试测试题</p>
<p class="p0" style="margin-bottom:0pt; margin-top:0pt; ">
<span style="font-size: 10.5000pt; font-family: 宋体">一、单选题<font face="Times New Roman">(</font><font face="宋体">第 </font><font face="Times New Roman">1 </font><font face="宋体">题~第 </font><font face="Times New Roman">80 </font><font face="宋体">题。选择一个正确的答案,将相应的字母填入题内的括号</font></span></p>
<p class="p0" style="margin-bottom:0pt; margin-top:0pt; ">
<span style="font-size: 10.5000pt; font-family: 宋体">中。每题 <font face="Times New Roman">1.0 </font><font face="宋体">分,满分 </font><font face="Times New Roman">80 </font><font face="宋体">分。</font><font face="Times New Roman">)</font></span></p>
<p class="p0" style="margin-bottom:0pt; margin-top:0pt; ">
<span style="font-size: 10.5000pt; font-family: 宋体">1.<font face="宋体">馒头的起发是属于( )疏松方法。</font></span></p>
<p class="p0" style="margin-bottom:0pt; margin-top:0pt; ">
<span style="font-size: 10.5000pt; font-family: 宋体">
<input type="radio" value="V1" name="R1" onclick=R1.value="*">A.微生物发酵  
<input type="radio" name="R1" value="V2" onclick=R1.value="B">B.物理  
<input type="radio" name="R1" value="V3" onclick=R1.value="C">C.化学  
<input type="radio" name="R1" value="V4" onclick=R1.value="D">D.不</span></p>
<p class="p0" style="margin-bottom:0pt; margin-top:0pt; ">
<span style="font-size: 10.5000pt; font-family: 宋体">2.<font face="宋体">碳酸氢铵</font><font face="Times New Roman">(NH4HCO3)</font><font face="宋体">的理化性质 呈白色粉状结晶,有氨臭味</font><font face="Times New Roman">;</font><font face="宋体">对( )不稳定,</font></span></p>
<p class="p0" style="margin-bottom:0pt; margin-top:0pt; ">
<span style="font-size: 10.5000pt; font-family: 宋体">
<input type="radio" name="R2" value="V5" onclick=R2.value="*">A.热  
<input type="radio" name="R2" value="V6" onclick=R2.value="B">B.冷    
<input type="radio" name="R2" value="V7" onclick=R2.value="C">C.水     <input type="radio" name="R2" value="V8" onclick=R2.value="D">D.油</span></p>
<p class="p0" style="margin-bottom:0pt; margin-top:0pt; "> </p>
<p class="p0" style="margin-bottom:0pt; margin-top:0pt; "> </p>
<p> </p>
<p>你的考试成绩为:<input type="text" name="defen" size="20"></p>
<p><input type="button" value="本题开始自动评分" name="submit" onclick=scorequiz(this.form)><input type="reset" value="重新测试" name="reset" onclick=clearquiz(this.form)></p>
</form>

</script>
</body>

</html>
...全文
92 回复 打赏 收藏 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

87,984

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧