zoukankan      html  css  js  c++  java
  • 每日总结

    员工培训系统,

    教师或用户查询界面:

    复制代码
    <%@ page language="java" contentType="text/ html; charset=UTF-8"
        pageEncoding="UTF-8" import = "java.util.*"%>
         <%@page import="bean.student"%>
          <%@page import="bean.teacher"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    <%
    String user=(String)request.getAttribute("user");
    List<student> liststudent=new ArrayList<student>();
    List<teacher> listteacher=new ArrayList<teacher>();
    if(user.equals("员工")) liststudent=(List<student>)request.getAttribute("Astudent");
    else listteacher=(List<teacher>)request.getAttribute("Ateacher");
    %>
    <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>
        <%
        if(user.equals("员工"))
        {
            for(student p:liststudent){
        %>
        <tr aligh="center">
            <td><%=p.getSID() %></td>
            <td><%=p.getSname() %></td>
            <td><%=p.getSsex() %></td>
            <td><%=p.getSjob() %></td>
            <td><%=p.getSsection() %></td>
            <br>
            </tr>
            <%    
            }
        }
        else if(user.equals("教师"))
        {
            for(teacher p:listteacher){
        %>
        <tr aligh="center">
            <td><%=p.getTID() %></td>
            <td><%=p.getTname() %></td>
            <td><%=p.getTsex() %></td>
            <td><%=p.getTjob() %></td>
            <td><%=p.getTsection() %></td>
            <br>
            </tr>
            <%    
            }
            }
            %>
            <td><a href="user.jsp">注销</a></td>
            <td><a href="findP.jsp">返回上一级</a></td>
        </table>
    </body>
    </html>
    复制代码
  • 相关阅读:
    html图片预览
    网易DBA私享会分享会笔记2
    网易DBA私享会分享会笔记1
    centos6.5适用的国内yum源:网易、搜狐
    如何去除 ckeditor 上传图片后在原码中留下的 style="width: 100%;height:100px"之类的代码呢?
    关于json.ajax ,php的那点事
    去掉所有的html标签
    about JNI
    some knowledge of maven {maven实战}
    What is Proguard?
  • 原文地址:https://www.cnblogs.com/ldy2396/p/14220676.html
Copyright © 2011-2022 走看看