201819102035田美玉
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>考试系统</title>
</head>
<body>
<form action="考试成绩.jsp" 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="pd1" id="pd1" value="1"></td>
<td><input type="radio" name="pd1" id="pd2"value="2"></td>
</tr>
<tr>
<td>3.爱国主义是中华民族精神的最高政治原则。</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>4.爱国主义是中华民族的动力源泉。</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>5.爱国主义具有历史性和抽象性。</td>
<td> <input type="radio" name="pd1" id="pd1" value="1"></td>
<td><input type="radio" name="pd1" id="pd2"value="2"></td>
</tr>
</table>>
<h2>二、单选题</h2><br>
<table>
<tr><td colspan="4"> <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"> 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="chec5kbox" 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</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:yellow'>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("2"))
{
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("2"))
{
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("1"))
{
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("2"))
{
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("1"))
{
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("1"))
{
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("2")&t11[2].equals("3"))
{
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("1")&t12[1].equals("2")&t12[2].equals("3"))
{
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.lengt