chengji.jsp~30~
资源名称:JSP02.rar [点击查看]
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
VBScript
- <%@ page contentType="text/html; charset=GBK" %>
- <%@ page import="java.sql.*" %>
- <%@ page language="java" %>
- <%@ page import="java.util.*" %>
- <%@ page import="proj112.*" %>
- <jsp:useBean id="a" scope="page" class="proj112.dbconn"/>
- <html>
- <head>
- <title>
- chengji
- </title>
- </head>
- <body bgcolor="#ffffff">
- <%
- String xuehao=(String)session.getAttribute("id");
- String sql="";
- sql="SELECT b.学期号,b.课程号,b.课程名,b.学分,b.主讲教师,a.成绩,a.重修成绩 FROM chengji b,成绩关联 a where b.课程号=a.课程号 and a.stu_id='"+xuehao+"'";
- ResultSet rs=a.executeQuery(sql);
- %>
- 姓名: <font color="#0033FF"><%=session.getAttribute("stu_name") %> </font> 学号: <font color="#0033FF"><%=session.getAttribute("id") %></font><br>
- <hr><br>
- <center>成绩表如下:<br>
- <p align="center">
- <table width="100%" cellspacing="0" cellpadding="4" rules="all" bordercolor="#CC9966" border="1" id="dg_rxkb" style="background-color:White;border-color:#CC9966;border-width:1px;border-style:None;width:100%;border-collapse:collapse;">
- <tr bgcolor="#9dcaf4">
- <td align="center"><font color="red">学期号</font></td>
- <td align="center"><font color="red">课程号</font></td>
- <td align="center"><font color="red">课程名</font></td>
- <td align="center"><font color="red">学分</font></td>
- <td align="center"><font color="red">主讲教师</font></td>
- <td align="center"><font color="red">成绩</font></td>
- <td align="center"><font color="red">重修成绩</font></td>
- </tr>
- <% while(rs.next())
- { %>
- <tr>
- <td align="center"><%=rs.getString("学期号")%></td>
- <td align="center"><%=rs.getString("课程号")%></td>
- <td align="center"><%=rs.getString("课程名")%></td>
- <td align="center"><%=rs.getString("学分")%></td>
- <td align="center"><%=rs.getString("主讲教师")%></td>
- <td align="center"><%=rs.getString("成绩")%></td>
- <td align="center"><%=rs.getString("重修成绩")%></td>
- </tr>
- <%} %>
- </table>
- </body>
- </html>