?? kc_manager.jsp
字號:
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.sql.*" %>
<%@ page errorPage="/public/errorBusy.jsp" %>
<%@ include file="/public/check_admin.jsp" %>
<jsp:useBean id="conn" scope="page" class="SQLBean.DBConn"/>
<script language="javascript">
function formCheck(theForm)
{
if(theForm.kecheng_id.value=="")
{
alert("課程代號不能為空!");
theForm.kecheng_id.focus();
return false;
}
if(theForm.kecheng_name.value=="")
{
alert("課程名稱不能為空!");
theForm.kecheng_name.focus();
return false;
}
if(theForm.college_id.value=="")
{
theForm.radio.value=1;
}
}
</script>
<html>
<head>
<title>課程管理</title>
<link rel="stylesheet" href="../../public/style.css">
</head>
<body class="ss">
<a href="javascript:window.location.reload()" class="a">刷新</a>
<a href="javascript:history.back()" class="a">返回</a>
<hr></hr>
<center>
<h3>添加課程</h3>
<form action="kecheng_add.jsp" method="post" onSubmit="return formCheck(this)">
<table width="39%" height="179" border="0" cellspacing="0">
<tr>
<td width="35%">課程代號:</td>
<td width="65%"><input name="kecheng_id" type="text" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td>課程名稱:</td>
<td><input name="kecheng_name" type="text" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td>課程所屬院系:</td>
<td><select name="college_id">
<option value="" selected>=====公共課程=====</option>
<%
ResultSet rs_c=null;
request.setCharacterEncoding("GBK");
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 colspan="2"><center><input type="submit" value="添加"></center></td>
</tr>
<%
String msg=(String)request.getParameter("errmsg");
if(msg!=null&&!msg.equals("")){
%>
<tr>
<td colspan="5"><div align="center"><font color="red" size="2"><%=msg%></font></div></td>
</tr>
<%
}
%>
</table>
</form>
</center>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -