• 每日总结


    浏览课程界面:

    <%@ page language="java" contentType="text/ html; charset=UTF-8"
    pageEncoding="UTF-8" import = "java.util.*"%>
    <%@page import="bean.teacher"%>
    <%@page import="bean.tclass"%>
    <%@page import="bean.student"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <%
    teacher Ateacher=(teacher)request.getAttribute("Ateacher");
    if(Ateacher==null)
    {
    Ateacher=(teacher)session.getAttribute("Ateacher");
    }
    List<tclass> Atclass=(List<tclass>)session.getAttribute("Atclass");
    List<student> Astudent=(List<student>)session.getAttribute("Astudent");
    out.println(Ateacher.getName());
    session.setAttribute("Ateacher",Ateacher);
    request.setAttribute("Ateacher",Ateacher);
    session.setAttribute("Atclass",Atclass);
    request.setAttribute("Atclass",Atclass);
    session.setAttribute("Astudent",Astudent);
    request.setAttribute("Astudent",Astudent);
    %>
    <form action="Saddc1.jsp" method="post" onsubmit="return chech(this)">
    <table align="center" width="450" border="1">
    <tr>
    <td align="center" colspan="5">
    <h2>浏览课程</h2>
    </td>
    </tr>
    <tr aligh="center">
    <td>课程编号</td>
    <td>课程名称</td>
    <td>选课人数</td>
    <td>任课教师</td>
    <td>人数上限</td>
    </tr>
    <%
    for(tclass p:Atclass){
    %>
    <tr aligh="center">
    <td><%=p.getID() %></td>
    <td><a href="Tlook1.jsp?ID=<%=p.getID()%>"><%=p.getName()%></a></td>
    <td><%=p.getSum() %></td>
    <td><%=p.getTeacher() %></td>
    <td><%=p.getNum() %></td>
    <br>
    </tr>
    <%
    }
    %>
    <td><a href="user.jsp">注销</a></td>
    <td><a href="loginS.jsp">返回上一级</a></td>
    </table>
    </form>
    </body>
    </html>

  • 相关阅读:
    字符串切片
    格式化输出
    原生链+对象冒充组合继承模式
    对象冒充继承和原生链实现继承的方法和问题
    xlwt使用
    xlrd使用
    pip安装插件库
    第一天入驻博客园
    2-2ARP概念
    1-14常用的应用层协议及应用
  • 原文地址:https://www.cnblogs.com/ldy2396/p/14218868.html
Copyright © 2020-2023  润新知