kecheng3.jsp
资源名称: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>
- <script language="javascript">
- function a(){
- alert("删除成功");
- }
- </script>
- <title>
- kecheng2
- </title>
- </head>
- <body bgcolor="#ffffff">
- 姓名: <font color="#0033FF"><%=session.getAttribute("stu_name") %> </font> 学号: <font color="#0033FF"><%=session.getAttribute("id") %></font><br>
- <hr><br>
- <font color="red"> 你选择的课程如下:<br>
- <%
- request.setCharacterEncoding("GBK");
- String stu_id=(String)session.getAttribute("id");
- String sql="";
- sql="SELECT * FROM 选课关联,kecheng where 选课关联.kch=kecheng.kch and 选课关联.stu_id='"+stu_id+"'";
- ResultSet rs=a.executeQuery(sql);%>
- <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>
- <td align="center"><font color="#6633CC">删除</font></td>
- <td align="center"><font color="#6633CC">课程号</font></td>
- <td align="center"><font color="#6633CC">课程名</font></td>
- <td align="center"><font color="#6633CC">任课教师</font></td>
- <td align="center"><font color="#6633CC">星期几</font></td>
- <td align="center"><font color="#6633CC">时间</font></td>
- <td align="center"><font color="#6633CC">上课教室</font></td>
- </tr>
- <% while(rs.next())
- { %>
- <tr>
- <td align="center"><a href="kecheng4.jsp?id3=<%=rs.getString("kch")%>" onclick="return a()" >删除</a></td>
- <td align="center"><%=rs.getString("kch")%></td>
- <td align="center"><%=rs.getString("kcm")%></td>
- <td align="center"><%=rs.getString("rkjs")%></td>
- <td align="center"><%=rs.getString("xqj")%></td>
- <td align="center"><%=rs.getString("sj")%></td>
- <td align="center"><%=rs.getString("skjs")%></td>
- </tr>
- <%} %>
- </table>
- </body>