• 2021.5.12


    今日学习进度:

    CSS设计

      第一天  第二天 第三天  第四天  第五天 
    所花时间(小时) 5  6    
    代码量(行) 500  600  300    
    博客量(篇) 1  1  1    
    了解到的知识点 web系统

     web界面

     css设计    

    index.jsp

    <%@page import="entity.Student"%>
    <%@page import="java.util.List"%>
    <%@page import="dao.Dao"%>
    <%@ page language="java" contentType="text/html; charset=utf-8"
        pageEncoding="utf-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>学生管理系统</title>
    <style type="text/css">
     .bg {
                    background-image:url(images/bg_2.jpg);
                    background-size:cover;
                }
        *{font-style: "微软雅黑"}
        #table{ border-collapse: collapse; margin: auto;text-align: center;}
        #table th{background-color: #fff7d5;border: 1px solid black;}
        #table td{background-color:#cffcd5;border: 1px solid black;padding: 15px;color: #000;}
        #table a{text-decoration: none;font-weight: bold;}
        #table a:hover {text-decoration: underline;}
    </style>
    </head>
    <body class="bg">
    <h2 style="text-align: center;">学生管理系统</h2>
    <br>
    <div style="text-align: center;">
        <a href="add.jsp" target="_self">添加学生</a>
    </div>
    <br>
    <% 
        request.setCharacterEncoding("utf-8");
        response.setCharacterEncoding("utf-8");
        List<Student> list=Dao.getAllStudents();
    %> 
    <%if(list.isEmpty()) {%>
    <br>
    <br>
    <br>
    <p style="text-align: center;font-size: xx-large;font-weight: 500;">当前数据库无相关信息</p>
    <%}else {%>
    <table  id="table">
        <tr>
            <th>姓名</th>
            <th>性别</th>
            <th>生日</th>
            <th>住址</th>
            <th>操作</th>
        </tr>
    <%for(Student str:list){ %>
        <tr>
            <td><%=str.getName() %></td>
            <td><%=str.getSex() %></td>
            <td><%=str.getBirthday() %></td>
            <td><%=str.getAddress() %></td>
            <td><a href="update.jsp?id=<%=str.getId() %>">修改</a>
            <a href="deletestudent.jsp?id=<%=str.getId() %>" onclick="return confirm('确认删除吗?')">删除</a></td>
        </tr>
    <%}} %>
    </table>
    </body>
    </html>

    样式如图:

  • 相关阅读:
    codeforces-1144 (div3)
    codeforces-1142 (div1)
    codeforces-1131 (div2)
    codeforces-1132 (div2)
    [HAOI2006]均分数据
    Ellipsoid
    [JSOI2004]平衡点 / 吊打XXX
    CF208E Blood Cousins
    CF570D Tree Requests
    CF600E Lomsat gelral
  • 原文地址:https://www.cnblogs.com/marr/p/14905834.html
Copyright © 2020-2023  润新知