?? edit_student.jsp
字號:
<%@ page language="java" pageEncoding="GB2312"%>
<%@ page import="cn.edu.bit.business.*,java.util.*,cn.edu.bit.Object.*" errorPage="error.jsp"%>
<html>
<head>
<title>Lomboz JSP</title>
<style type="text/css">
<!--
@import url("../../css/OSX.css");
-->
</style>
</head>
<SCRIPT language=javascript>
function CheckForm()
{
if(document.edit_student_Form.name.value=="")
{
alert("請輸入姓名!");
return false;
}
document.edit_student_Form.submit();
}
</SCRIPT>
<body bgcolor="#CAD7F7" topmargin="100">
<%String id = (String) request.getParameter("student_id");
int ID = Integer.parseInt(id);
Student stu = Student_Manager.getStudent(ID);
ArrayList gl = (ArrayList) Grade_Manager.getGradeList();
%>
<div align="center">
<form name="edit_student_Form" method="post" action="/Lab/edit_student">
<table width="500" border="0" cellspacing="1" cellpadding="1" class="tableBorder">
<tr>
<td colspan="2" align="center" background="../../images/guanli/admin_bg_1.gif" class="whitenormal">
編輯學生
</td>
</tr>
<tr>
<td width="97" align="center" bgcolor="F1F3F5" class="normalText">
姓名:
</td>
<td width="396" bgcolor="F1F3F5">
<input name="name" type="text" id="name" class="textBox" value="<%=stu.getName()%>">
<input type="hidden" name="student_id" value="<%=ID%>">
</td>
</tr>
<tr>
<td align="center" bgcolor="F1F3F5" class="normalText">
性別:
</td>
<td bgcolor="F1F3F5">
<input type="radio" name="radiobutton" value="male" <%if(stu.getSex().equals("男")){%> checked <%}%> />
<span class="normalText">男</span>
<input type="radio" name="radiobutton" value="female" <%if(stu.getSex().equals("女")){%> checked <%}%> />
<span class="normalText">女</span>
</td>
</tr>
<tr>
<td align="center" bgcolor="F1F3F5" class="normalText">
年級:
</td>
<td bgcolor="F1F3F5">
<select name="grade">
<%Iterator iter = gl.iterator();
while (iter.hasNext()) {
Grade grade = (Grade) iter.next();
%>
<%if (stu.getGrade_id() == grade.getId()) {
%>
<option value="<%=grade.getId()%>" selected>
<%=grade.getName()%>
</option>
<%} else {
%>
<option value="<%=grade.getId()%>">
<%=grade.getName()%>
</option>
<%}
}
%>
</select>
</td>
</tr>
<tr>
<td align="center" bgcolor="F1F3F5" class="normalText">
圖片:
</td>
<td bgcolor="F1F3F5">
<span class="normalText">images/face/</span>
<input name="image" type="text" id="image" class="textBox" value="<%=stu.getImage()%>">
</td>
</tr>
<tr align="center">
<td colspan="2" bgcolor="F1F3F5">
<input type="button" name="Submit" value="保存修改" onClick="CheckForm()">
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -