?? account_class_teacher.jsp
字號:
<%@ page contentType="text/html;charset=GBK" import="java.sql.*"%>
<%@ page errorPage="/public/errorBusy.jsp" %>
<%@ page import="java.sql.*" %>
<%@ include file="/public/check_admin.jsp" %>
<jsp:useBean id="conn" scope="page" class="SQLBean.DBConn"/>
<%
request.setCharacterEncoding("GBK");
%>
<script language="javascript">
function formCheck(theForm)
{
if(theForm.class_teacher_id.value=="")
{
alert("用戶名不能為空!");
theForm.class_teacher_id.focus();
return false;
}
if(theForm.class_teacher_password_1.value=="")
{
alert("密碼不能為空!");
theForm.class_teacher_password_1.focus();
return false;
}
if(theForm.class_teacher_password_2.value=="")
{
alert("確認密碼不能為空!");
theForm.class_teacher_password_2.focus();
return false;
}
if(theForm.class_teacher_name.value=="")
{
alert("真實姓名不能為空!");
theForm.class_teacher_name.focus();
return false;
}
if(theForm.class_teacher_password_1.value!=theForm.class_teacher_password_2.value)
{
alert("確認密碼不正確!");
theForm.class_teacher_password_2.focus();
return false;
}
if(theForm.college_id.value=="")
{
alert("請選擇所屬院系!");
theForm.college_id.focus();
return false;
}
}
</script>
<html>
<head>
<title>班主任賬號管理</title>
<link rel="stylesheet" href="../../public/style.css">
</head>
<body class="ss">
<a href="account_class_teacher.jsp" class="a">添加賬號</a>
<a href="account_class_teacher_m.jsp" class="a">管理賬號</a>
<a href="javascript:window.location.reload()" class="a">刷新</a>
<a href="javascript:history.back()" class="a">返回</a>
<hr></hr>
<center>
<h3>添加班主任賬號</h3>
<form action="class_teacher_add.jsp" method="post" onSubmit="return formCheck(this)">
<table width="40%" border="0" cellspacing="0">
<tr>
<td width="40%">用戶名:</td>
<td width="60%"><input name="class_teacher_id" type="text" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="40%">密碼:</td>
<td width="60%"><input name="class_teacher_password_1" type="password" value="123456" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="40%">確認密碼:</td>
<td width="60%"><input name="class_teacher_password_2" type="password" value="123456" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="40%">真實姓名:</td>
<td width="60%"><input name="class_teacher_name" type="text" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="40%">所屬院系:</td>
<td><select name="college_id">
<option value="" selected>===請選擇===</option>
<%
ResultSet rs_c=null;
rs_c=conn.executeQuery("select * from college");
while(rs_c.next())
out.println("<option value="+rs_c.getString("college_id")+">"+rs_c.getString("college_name")+"</option>");
conn.close();
%>
</select></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="40%"><div align="center"><input type="submit" name="Submit" value="添加"></div></td>
<td width="60%"><div align="center"><input type="reset" name="Submit" value="重置"></div></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<%
String msg=(String)request.getParameter("errmsg");
if(msg!=null&&!msg.equals("")){
%>
<tr>
<td colspan="2"><div align="center"><font color="red" size="2"><%=msg%></font></div></td>
</tr>
<%
}
%>
</table>
</form>
</center>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -