zoukankan      html  css  js  c++  java
  • jsp之table美化

    1、<table>

    ((1)class是style中的值,表示table使用这个class的属性

    (2)cellpadding="10" 表示每个单元格的内容与四个边界的距离

    (3)align="center" 表示在这个页面的方位,center表示中间

    <style>
    .table {
        border: 1px solid #000000;
        border-collapse: collapse;
        width
        =100%;
    }
    
    .table th {
        border: 1px solid #000000;
        border-collapse: collapse;
    }
    
    .table td {
        border: 1px solid #000000;
        border-collapse: collapse;
    }
    </style>
    
    
    <table class="table" align="center" cellpadding="10">
            <tr>
                <%for(String title:titleList) {%>
                <th><%=title %></th>
                <%} %>
                <th>操作</th>
            </tr>
            <%for(Map<String,Object> map:product) {%>
            <tr>
                <%for(String title:titleList) {%>
                <td align="center"><%=map.get(title) %></td>
                <%} %>
                <td><a href="update_product.jsp?action=edit">修改</a> <a
                    href="<%=path%>/servlet/ProductEdit?action=del&type=<%=type %>&id=<%=map.get("id") %>"
                    onclick="return confirm ('确定删除?')">删除</a></td>
            </tr>
            <%} %>
        </table>

    Done!

        <table align="center" cellpadding="10">
            <tr>
                <td ><input type="button"
                    onclick="window.location.href='<%=path%>/servlet/ProductAdd?type=<%=type %>'"
                    value="添加"></td>
                <td ><%=pageString%></td>
            </tr>
        </table>

  • 相关阅读:
    Python Module_subprocess_子进程(程序调用)
    开机自启动Powershell脚本
    开机自启动Powershell脚本
    Powershell 音乐播放
    Powershell 音乐播放
    Powershell指令集_2
    Zabbix实战-简易教程(1)--总流程
    AWS上获取监控数据(EC2/RDS都支持)
    Grafana最新版本4.3.1安装(后端使用mysql)
    Haproxy实战(3)
  • 原文地址:https://www.cnblogs.com/xingyyy/p/3486075.html
Copyright © 2011-2022 走看看