📄 chooseclass_left.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="errorpage.jsp" %>
<%@ page import="java.sql.*" %>
<%request.setCharacterEncoding("gb2312"); %>
<html>
<head>
<link href="Inc/student_com.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>公布成绩</title>
<LINK rel="stylesheet" type="text/css" href="style.css">
<style type="text/css">
<!--
body {
background-color: #C0CAE0;
}
-->
</style>
</head>
<jsp:useBean id="tea" scope="page" class="myBean.Teacher"/>
<%String tea_id = request.getParameter("tea_id");
ResultSet rs = tea.getClaandCour(tea_id);
%>
<script type="text/javascript">
var onecount;
onecount=0;
subcat = new Array();
<%
int count = 0;
while(rs.next()){
%>
subcat[<%=count%>] = new Array("<%=rs.getString("COUR_ID")%>","<%=rs.getString("CLASS_ID")%>");
<%
count++;
} rs.close();
%>
onecount=<%=count%>;
<!--决定select显示的函数-->
function changelocation()/*locationid*/
{
document.myform.classid.length = 0;
var locationid=myform.course.value;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][0]==locationid)
{
document.myform.classid.options[document.myform.classid.length] = new Option(subcat[i][1],subcat[i][1]);
}
}
}
</script>
<body bgcolor="#0099FF" text="#FFFFFF">
<p align="center"><font color="#00FF00" size="+3" face="华文行楷">新增学生成绩</font></p>
<div align="center">
<form name="myform" method="post" action="addMark.jsp" target="mainFrame">
<table>
<tr>
<td>课程</td>
<td><select name="course" size="1" id="course" onChange="changelocation()">
<option selected >请选择课程</option>
<% tea.setId(tea_id);
ResultSet rs1 = tea.getCourse();
while(rs1.next()){
String s3 = rs1.getString("COUR_ID");
String s2 = rs1.getString("NAME");
%>
<option value=<%=s3%>><%=s2%></option>
<%}
rs1.close();%>
</select></td>
</tr>
<p> </p>
<p> </p>
<tr><td height="50"></td><td></td></tr>
<tr>
<td>学生所在班级 </td>
<td><select name="classid" size="1" id="classid">
<option selected >请选择班级</option>
</select></td>
</tr>
</table>
<p> </p>
<p align="center">
<input type="submit" name="Submit" value="确定">
</p>
</form>
</div>
<div align="center"><a href="teacher.jsp" target="_parent">返回</a>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -