forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquestions_Modify.jsp
More file actions
139 lines (137 loc) · 6.22 KB
/
questions_Modify.jsp
File metadata and controls
139 lines (137 loc) · 6.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<jsp:useBean id="lesson" class="com.wgh.dao.TaoTiDAO" scope="page"/>
<jsp:useBean id="taoTi" class="com.wgh.dao.QuestionsDAO" scope="page"/>
<html>
<head>
<title>网络在线考试——后台管理</title>
<link href="../CSS/style.css" rel="stylesheet">
</head>
<script language="javascript">
function checkForm(form){
if(form.name.value==""){
alert("请输入考试题目名称!");form.name.focus();return false;
}
}
function show(val){
if(val=="单选题"){
sOption.style.display="";
mOption.style.display="none";
}else if(val=="多选题"){
sOption.style.display="none";
mOption.style.display="";
}
}
</script>
<body>
<%@ include file="top.jsp"%>
<table width="778" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
<td width="176" align="center" valign="top" bgcolor="#FFFFFF"><%@ include file="left.jsp"%></td>
<td width="602" valign="top" bgcolor="#FFFFFF"><table width="99%" height="487" border="0" cellpadding="0" cellspacing="0" align="right">
<tr>
<td height="30" bgcolor="#EEEEEE" class="tableBorder_thin"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="78%" class="word_grey"> 当前位置:<span class="word_darkGrey">考试题目管理 > 修改考试题目 >>></span></td>
<td align="right"><img src="../Images/m_ico1.gif" width="5" height="9"> 当前管理员:<%=session.getAttribute("manager")%> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="84%"> </td>
</tr>
</table>
<html:form action="/manage/questions.do?action=questionsModify" method="post" onsubmit="return checkForm(questionsForm)">
<bean:define id="lessonID" name="questionsModifyQuery" property="lessonId" type="Integer"/>
<bean:define id="taoTiID" name="questionsModifyQuery" property="taoTiId" type="Integer"/>
<bean:define id="defaultOption" name="questionsModifyQuery" property="type" type="String"/>
<table width="85%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#D2E3E6" bordercolorlight="#FFFFFF">
<tr>
<td height="30" align="left" style="padding:5px;">所属课程:</td>
<td align="left"><%=lesson.getLesson(lessonID)%></td>
</tr>
<tr>
<td height="30" align="left" style="padding:5px;">所属套题:</td>
<td align="left" id="subType"><%=taoTi.getTaoTi(taoTiID)%></td>
</tr>
<tr align="center">
<td width="15%" height="30" align="left" style="padding:5px;">考试题目:</td>
<td width="85%" align="left"><html:text property="subject" size="40" name="questionsModifyQuery"/>
<html:hidden property="ID" name="questionsModifyQuery"/>
* </td>
<tr>
<tr>
<td height="30" align="left" style="padding:5px;">试题类型:</td>
<td align="left"><html:select property="type" onchange="show(this.value)" name="questionsModifyQuery">
<html:option value="单选题">单选题</html:option>
<html:option value="多选题" >多选题</html:option>
</html:select> </td>
</tr>
<tr align="center">
<td width="15%" height="30" align="left" style="padding:5px;">选项A:</td>
<td width="85%" align="left"><html:text property="optionA" size="40" name="questionsModifyQuery"/>
* </td>
</tr>
<tr align="center">
<td width="15%" height="30" align="left" style="padding:5px;">选项B:</td>
<td width="85%" align="left"><html:text property="optionB" size="40" name="questionsModifyQuery"/>
* </td>
</tr>
<tr align="center">
<td width="15%" height="30" align="left" style="padding:5px;">选项C:</td>
<td width="85%" align="left"><html:text property="optionC" size="40" name="questionsModifyQuery"/>
* </td>
</tr>
<tr align="center">
<td width="15%" height="30" align="left" style="padding:5px;">选项D:</td>
<td width="85%" align="left"><html:text property="optionD" size="40" name="questionsModifyQuery"/>
* </td>
</tr>
<tr align="center">
<td width="15%" height="30" align="left" style="padding:5px;">正确答案:</td>
<td width="85%" align="left" id="sOption"><html:select property="answer" name="questionsModifyQuery">
<html:option value="A">A </html:option>
<html:option value="B">B </html:option>
<html:option value="C">C </html:option>
<html:option value="D">D </html:option>
</html:select> </td>
<td width="85%" align="left" id="mOption" style="display:none">
<html:multibox property="answerArr" styleClass="noborder" name="questionsModifyQuery">A</html:multibox>
A
<html:multibox property="answerArr" styleClass="noborder" name="questionsModifyQuery">B</html:multibox>
B
<html:multibox property="answerArr" styleClass="noborder" name="questionsModifyQuery">C</html:multibox>
C
<html:multibox property="answerArr" styleClass="noborder" name="questionsModifyQuery">D</html:multibox>
D </td>
</tr>
<tr align="center">
<td width="15%" height="30" align="left" style="padding:5px;">备注:</td>
<td width="85%" align="left"><html:text property="note" size="40" name="questionsModifyQuery"/> </td>
</tr>
<tr>
<td height="65" align="left" style="padding:5px;"> </td>
<td><html:submit property="submit" styleClass="btn_grey" value="保存"/>
<html:reset property="reset" styleClass="btn_grey" value="取消"/>
<html:button property="button" styleClass="btn_grey" value="返回" onclick="window.location.href='questions.do?action=questionsQuery'"/></td>
</tr>
</table>
<script language="javascript">
show("<%=defaultOption%>");
</script>
</html:form></td>
</tr>
</table>
</td>
</tr>
</table>
<%@ include file="copyright.jsp"%>
</body>
</html>