<%--
Created by IntelliJ IDEA.
User: 和
Date: 2020/9/21
Time: 17:05
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>$Title$</title>
</head>
<body>
<form action="答案.jsp" method="post" name="form1">
单选题<br>
1.下列不属于音色的特征是(10分)<br>
<input type="radio" name="t1" value="A">A.音量<br>
<input type="radio" name="t1" value="B">B.音调<br>
<input type="radio" name="t1" value="C">C.噪声<br>
<input type="radio" name="t1" value="D">D.响度<br>
2.下列是可再生资源的是(10分)<br>
<input type="radio" name="t2" value="A">A、石油<br>
<input type="radio" name="t2" value="B">B、水<br>
<input type="radio" name="t2" value="C">C、易拉罐<br>
<input type="radio" name="t2" value="D">D、氧气<br>
3.家庭电路常用电压指数是()<br>
<input type="radio" name="t3" value="A">A、220V<br>
<input type="radio" name="t3" value="B">B、110V<br>
<input type="radio" name="t3" value="C">C、180<br>
<input type="radio" name="t3" value="D">D、360V<br>
多选题<br>
4.我国的少数民族有哪些(10分)<br>
<input type="checkbox" name="t4" value="A">A、汉族<br>
<input type="checkbox" name="t4" value="B">B、蒙族<br>
<input type="checkbox" name="t4" value="C">C、傣族<br>
<input type="checkbox" name="t4" value="D">D、高山族<br>
5.世界上三大经济三大强国<br>
<input type="checkbox" name="t5" value="A">A、美国<br>
<input type="checkbox" name="t5" value="B">B、日本<br>
<input type="checkbox" name="t5" value="C">C、中国<br>
<input type="checkbox" name="t5" value="D">D、保加利亚<br>
6.世界上拥有熊猫的国家(不包括租和借)(10分)<br>
<input type="checkbox" name="t6" value="A">A、中国<br>
<input type="checkbox" name="t6" value="B">B、日本<br>
<input type="checkbox" name="t6" value="C">C、美国<br>
<input type="checkbox" name="t6" value="D">D、朝鲜<br>
判断题<br>
7. 加快少数民族和民族地区的经济发展,为坚持和完善民族区域自治制度提供物质基础。(10分)<br>
<input type="radio" name="t7" value="true">对<br>
<input type="radio" name="t7" value="false">错<br>
8.雷电的电压没有家庭使用的电压大(10分)<br>
<input type="radio" name="t8" value="true">对<br>
<input type="radio" name="t8" value="false">错<br>
9.大地是负极(10分)<br>
<input type="radio" name="t9" value="true">对<br>
<input type="radio" name="t9" value="false">错<br>
10. 家用电器发生自燃时不能用水灭火(10分)<br>
<input type="radio" name="t10" value="true">对<br>
<input type="radio" name="t10" value="false">错<br>
<input type="submit" value="提交" name="submit">
<input type="reset" value="重置">
</body>
</html>
<%--
Created by IntelliJ IDEA.
User: 和
Date: 2020/9/21
Time: 17:09
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
</head>
<body>
<%!
int sum = 0;
%>
<%
String t1 = request.getParameter("t1");
String t2 = request.getParameter("t2");
String t3 = request.getParameter("t3");
String t4[] = request.getParameterValues("t4");
String t5[] = request.getParameterValues("t5");
String t6[] = request.getParameterValues("t6");
String t7 = request.getParameter("t7");
String t8 = request.getParameter("t8");
String t9 = request.getParameter("t9");
String t10 = request.getParameter("t10");
if (t1 == null) {
out.println("<p style='color:red'>1.回答错误不得分</p>");
out.print("<p style='color:blue'> 正确答案为B</p>");
} else if (t1.equals("B")) {
sum = sum + 10;
out.print("<p style='color:green'>1.B正确</p>");
} else {
out.print("<p style='color:red'>1.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为B</p>");
}
%>
<%
if (t2 == null) {
out.println("<p style='color:red'>2.回答错误不得分</p>");
out.print("<p style='color:blue'> 正确答案为C</p>");
} else if (t2.equals("A")) {
sum = sum + 10;
out.print("<p style='color:green'>2.A正确</p>");
} else {
out.print("<p style='color:red'>2.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为C</p>");
}
%>
<%
if (t3 == null) {
out.println("<p style='color:red'>3.回答错误不得分</p>");
out.print("<p style='color:blue'> 正确答案为A</p>");
} else if (t3.equals("A")) {
sum = sum + 10;
out.print("<p style='color:green'>3.A正确</p>");
} else {
out.print("<p style='color:red'>3.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为A</p>");
}
%>
<%
if (t4 == null) {
out.println("<p style='color:red'>4.回答错误不得分</p>");
out.print("<p style='color:blue'> 正确答案为BCD</p>");
}else {
for (String s : t4) {
out.print(s);
}
if (t4.length == 3) {
if (t4[0].equals("A") && t4[1].equals("B") && t4[2].equals("D")) {
sum = sum + 10;
out.print("<p style='color:green'>4.BCD正确</p>");
} else {
out.print("<p style='color:red'>4.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为BCD</p>");
}
} else {
out.print("<p style='color:red'>4.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为BCD</p>");
}
}
%>
<%
if (t5 == null) {
out.println("<p style='color:red'>5.回答错误不得分</p>");
out.print("<p style='color:blue'> 正确答案为ACD</p>");
}else {
for (String s : t5) {
out.print(s);
}
if (t5.length == 1 || t5.length == 2 || t5.length == 4) {
out.print("<p style='color:red'>5.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为ACB</p>");
}
else if (t5.length == 3) {
if (t5[0].equals("A") && t5[1].equals("C") && t5[2].equals("D")) {
sum = sum + 10;
out.print("<p style='color:green'>5.ACB正确</p>");
} else {
out.print("<p style='color:red'>5.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为ACB</p>");
}
}
}
%>
<%
if (t6 == null) {
out.println("<p style='color:red'>6.回答错误不得分</p>");
out.print("<p style='color:blue'> 正确答案为AC</p>");
}else {
for (String s : t6) {
out.print(s);
}
if (t6.length == 1 || t6.length == 2 || t6.length == 4) {
out.print("<p style='color:red'>6.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为AC</p>");
} else if (t6.length == 3) {
if (t6[0].equals("A") && t6[1].equals("B") && t6[2].equals("C")) {
sum = sum + 10;
out.print("<p style='color:green'>6.AC正确</p>");
} else {
out.print("<p style='color:red'>6.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为AC</p>");
}
}
}
%>
<%
if (t7 == null) {
out.println("<p style='color:red'>7.回答错误不得分</p>");
out.print("<p style='color:blue'> 正确答案为:对</p>");
} else if (t7.equals("true")) {
sum = sum + 10;
out.print("<p style='color:green'>7.A正确</p>");
} else {
out.print("<p style='color:red'>7.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为:对</p>");
}
%>
<%
if (t8 == null) {
out.print("<p style='color:red'>8.回答错误不得分</p>");
out.print("<p style='color:blue'> 正确答案为:错</p>");
} else if (t8.equals("false")) {
sum = sum + 10;
out.print("<p style='color:green'>8.A正确</p>");
} else {
out.print("<p style='color:red'>8.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为:错</p>");
}
%>
<%
if (t9 == null) {
out.println("<p style='color:red'>9.回答错误不得分</p>");
out.print("<p style='color:blue'> 正确答案为:对</p>");
} else if (t9.equals("true")) {
sum = sum + 10;
out.print("<p style='color:green'>9.正确</p>");
} else {
out.print("<p style='color:red'>9.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为:对</p>");
}
%>
<%
if (t10 == null) {
out.println("<p style='color:red'>10.回答错误不得分</p>");
out.print("<p style='color:blue'> 正确答案为:错</p>");
} else if (t10.equals("false")) {
sum = sum + 10;
out.print("<p style='color:green'>10.正确</p>");
} else {
out.print("<p style='color:red'>10.选项错误</p>" );
out.print("<p style='color:blue'>正确答案为:错</p>");
}
out.print("总分为" + sum);
%>
</body>
</html>