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>

  • 相关阅读:
    1013团队Beta冲刺day3
    1013团队Beta冲刺day2
    1013团队Beta冲刺day1
    beta预备
    团队作业——系统设计
    个人技术博客(α)
    团队作业—预则立&&他山之石
    软工实践- 项目需求规格说明书
    软工第二次作业 团队选题报告
    结队作业-匹配
  • 原文地址:https://www.cnblogs.com/xingyyy/p/3486075.html
Copyright © 2011-2022 走看看