题目代码
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>考试系统</title>
</head>
<body>
<form action="成绩分析.jsp" name="example" method="post">
<h2>一、判断</h2><br>
<table>
<tr>
<td></td><td>正确</td><td>错误</td>
</tr>
<tr>
<td>1.将机器上的紧急事故开关(亦称急停开关)作为一般操作的停止开关频繁使用,这是可以的。</td>
<td> <input type="radio" name="pd1" id="pd1" value="1"></td>
<td><input type="radio" name="pd1" id="pd2"value="2"></td>
</tr>
<tr>
<td>2.防火门按开启状态分为常闭防火门和常开防火门。</td>
<td> <input type="radio" name="pd2"value="是"></td>
<td><input type="radio" name="pd2"value="否"></td>
</tr>
<tr>
<td>3.防火门应为向疏散方向开启的平开门,并在关闭后应能从任何一侧手动开启。</td>
<td> <input type="radio" name="pd3"value="是"></td>
<td><input type="radio" name="pd3"value="否"></td>
</tr>
<tr>
<td>4.常闭防火门开启后应能自动闭合。</td>
<td> <input type="radio" name="pd4"value="是"></td
<td><input type="radio" name="pd4"value="否"></td>
</tr>
<tr>
<td>5.常闭防火门平时在防火门释放器作用下处于开启状态,火灾时人工关闭。</td>
<td> <input type="radio" name="pd5"value="是"></td>
<td><input type="radio" name="pd5"value="否"></td>
</tr>
</table>
<h2>二、单项选择</h2><br>
<table>
<tr><td colspan="4"> 1.国家法律规定( )是安全生产的责任主体。</td></tr>
<tr>
<td><input type="radio" name="xz1"value="1">A.企业主要负责人 </td>
<td><input type="radio" name="xz1"value="2">B.企业 </td>
<td><input type="radio" name="xz1"value="3">C.安全管理人员</td>
<td><input type="radio" name="xz1"value="4">D.政府部门</td>
</tr>
<tr><td colspan="4"> 2.安全风险是指()。</td></tr>
<tr>
<td><input type="radio" name="xz2"value="1">A.危险源</td>
<td><input type="radio" name="xz2"value="2">B.事故隐患</td>
<td><input type="radio" name="xz2"value="3"> C.发生危险事件或有害暴露,与随之引发的人身伤害或健康损害的严重性的组合 </td>
<td><input type="radio" name="xz2"value="4">D.安全事故</td>
</tr>
<tr><td colspan="4"> 3.禁止标识是指( )</td></tr>
<tr>
<td><input type="radio" name="xz3"value="1">A.提醒人们对周围环境引起注意,以避免可能发生危险的图形标志;</td>
<td><input type="radio" name="xz3"value="2">B.强制人们必须做出某种动作或采取防范措施的图形标志</td>
<td><input type="radio" name="xz3"value="3">C.向人们提供各种信息(如标明安全设施或场所等)的图形标志</td>
<td><input type="radio" name="xz3"value="4">D.禁止人们不安全行为的图形标志;</td>
</tr>
<tr><td colspan="4"> 工人操作机械设备时,穿紧身合适工作服的目的是( )。</td></tr>
<tr>
<td> <input type="radio" name="xz4"value="1">A、服装统一</td>
<td><input type="radio" name="xz4"value="2">B、符合管理要求</td>
<td><input type="radio" name="xz4"value="3"> C、防止被机器转动部分缠绕</td>
<td><input type="radio" name="xz4"value="4">D、活动方便</td>
</tr>
<tr><td colspan="4"> 5、我国法律明确规定,对生产安全事故实行( )制度。</td></tr>
<tr>
<td> <input type="radio" name="xz5"value="1">A、监察制度</td>
<td><input type="radio" name="xz5"value="2">B、严格管理制度</td>
<td><input type="radio" name="xz5"value="3">C、责任追究</td>
<td><input type="radio" name="xz5"value="4">D、预防制度</td>
</tr>
</table>
<h2>三、多项选择</h2><br>
1.从业人员发现事故隐患或者其他不安全因素,应当立即向( )报告;接到报告的人员应当及时予以处理。<br>
<input type="checkbox" name="dx1" value="1">A.安全监察机构<br>
<input type="checkbox" name="dx1"value="2">B.地方政府<br>
<input type="checkbox" name="dx1"value="3">C.事故应急措施<br>
<input type="checkbox" name="dx1"value="4">D.安全防范措施<br>
2.生产经营单位应当对从业人员进行安全生产教育和培训,保证从业人员具备( )。未经安全生产教育和培训合格的从业人员,不得上岗作业。<br>
<input type="checkbox" name="dx2"value="1">A.必要的安全生产知识<br>
<input type="checkbox" name="dx2"value="2">B.必要的企业管理知识<br>
<input type="checkbox" name="dx2"value="3">C.熟悉有关的安全生产规章制度和安全操作规程<br>
<input type="checkbox" name="dx2"value="4">D.掌握本岗位的安全操作技能<br>
3.拨打急救电话时,应说清( )。<br>
<input type="checkbox" name="dx3"value="1">A.受伤的人数<br>
<input type="checkbox" name="dx3"value="2">B.患者的伤情<br>
<input type="checkbox" name="dx3"value="3">C.地点<br>
<input type="checkbox" name="dx3"value="4">D.患者的姓名<br>
4.事故隐患是指 ( ),事故隐患是控制危险源的安全措施的失效。<br>
<input type="checkbox" name="dx4"value="1">A.作业场所<br>
<input type="checkbox" name="dx4"value="2">B.作业地点<br>
<input type="checkbox" name="dx4"value="3">C.设备或设施的不安全状态<br>
<input type="checkbox" name="dx4"value="4">D.人的不安全行为<br>
5.报火警时,应注意( )<br>
<input type="checkbox" name="dx5"value="1">A.讲清着火的单位或地点<br>
<input type="checkbox" name="dx5"value="2">B.讲清火险所处的楼号、楼层<br>
<input type="checkbox" name="dx5"value="3">C.讲清着火物质<br>
<input type="checkbox" name="dx5"value="4">D.讲清报警人的姓名和电话<br>
<input type="submit" value="提交">
</form>
</body>
</html>
分数页:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>成绩分析</title>
</head>
<body>
<% int score=0;
String t1=request.getParameter("pd1");
String t2=request.getParameter("pd2");
String t3=request.getParameter("pd3");
String t4=request.getParameter("pd4");
String t5=request.getParameter("pd5");
String t6=request.getParameter("xz1");
String t7=request.getParameter("xz2");
String t8=request.getParameter("xz3");
String t9=request.getParameter("xz4");
String t10=request.getParameter("xz5");
String t11[]=request.getParameterValues("dx1");
String t12[]=request.getParameterValues("dx2");
String t13[]=request.getParameterValues("dx3");
String t14[]=request.getParameterValues("dx4");
String t15[]=request.getParameterValues("dx5");
if (t1==null)
{
out.print("<p style='color:blue'>1.漏选</p>");
}
else if(t1.equals("1"))
{
out.print("<p style='color:green'>1.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>1.错误</p>");
if (t2==null)
{
out.print("<p style='color:blue'>2.选项未全</p>");
}
else if(t2.equals("1"))
{
out.print("<p style='color:green'>2.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>2.错误</p>");
if (t3==null)
{
out.print("<p style='color:blue'>3.选项未全</p>");
}
else if(t3.equals("1"))
{
out.print("<p style='color:green'>3.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>3.错误</p>");
if (t4==null)
{
out.print("<p style='color:blue'>4.选项未全</p>");
}
else if(t4.equals("1"))
{
out.print("<p style='color:green'>4.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>4.错误</p>");
if (t5==null)
{
out.print("<p style='color:blue'>5.选项未全</p>");
}
else if(t5.equals("2"))
{
out.print("<p style='color:green'>5.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>5.错误</p>");
if (t6==null)
{
out.print("<p style='color:blue'>6.选项未全</p>");
}
else if(t6.equals("4"))
{
out.print("<p style='color:green'>6.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>6.错误</p>");
if (t7==null)
{
out.print("<p style='color:blue'>7.选项未全</p>");
}
else
if(t7.equals("3"))
{
out.print("<p style='color:green'>7.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>7.错误</p>");
if (t8==null)
{
out.print("<p style='color:blue'>8.选项未全</p>");
}
else
if(t8.equals("2"))
{
out.print("<p style='color:green'>8.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>8.错误</p>");
if (t9==null)
{
out.print("<p style='color:blue'>9.选项未全</p>");
}
else
if(t9.equals("4"))
{
out.print("<p style='color:green'>9.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>9.错误</p>");
if (t10==null)
{
out.print("<p style='color:blue'>10.选项未全</p>");
}
else
if(t10.equals("2"))
{
out.print("<p style='color:green'>10.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>3.错误</p>");
if (t11==null||t11.length<2)
{
out.print("<p style='color:blue'>11.选项未全</p>");
}
else
if(t11[0].equals("1")&t11[1].equals("4"))
{
out.print("<p style='color:green'>11.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>11.错误</p>");
if (t12==null||t12.length<3)
{
out.print("<p style='color:blue'>12.选项未全</p>");
}
else
if(t12[0].equals("2")&t12[1].equals("3")&t12[2].equals("5"))
{
out.print("<p style='color:green'>12.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>12.错误</p>");
if (t13==null||t13.length<4)
{
out.print("<p style='color:blue'>13.选项未全</p>");
}
else
if(t13[0].equals("1")&t13[1].equals("2")&t13[2].equals("3")&t13[3].equals("4"))
{
out.print("<p style='color:green'>13.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>13.错误</p>");
if (t14==null||t14.length<3)
{
out.print("<p style='color:blue'>14.选项未全</p>");
}
else
if(t14[0].equals("1")&t14[1].equals("2")&t14[2].equals("4"))
{
out.print("<p style='color:green'>14.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>14.错误</p>");
if (t15==null||t15.length<3)
{
out.print("<p style='color:blue'>15.选项未全</p>");
}
else
if(t15[0].equals("1")&t15[1].equals("2")&t15[2].equals("4"))
{
out.print("<p style='color:green'>15.正确</p>");
score+=5;
}
else
out.print("<p style='color:red'>15.错误</p>");
out.print("<p style='color:red;'><font size='120px;'>成绩"+score+"</font><p>");
%>
</body>
</html>