• JSP布局相关使用


    1、添加一个“返回到上一步”的按钮

    <input type="button" onclick="history.go(-1);" value="返回" class="button">

    2、div的使用:

    <div align="center"  style="margin:20px;">
            <s:form action="user" >
    ....
            </s:form>
    </div>

    3、fieldset+legend实现方框框住布局

            <fieldset>
                <legend>登录界面</legend>
                <s:form action="user">
    ...
                </s:form>
            </fieldset>

    4、给表格将上边框

    border-collapse设置边框的属性
    separate:
    默认值。边框会被分开。不会忽略border-spacing 和 empty-cells 属性。
    collapse:
    如果可能,边框会合并为一个单一的边框。会忽略border-spacing 和 empty-cells 属性。
    inherit:
    规定应该从父元素继承border-collapse属性的值。
    table设置最外层的边框
    table th表示标题的边框
    table td设置每行内容的边框

    <td>表示内容单元格 
    <th>则表示标题,一般用在一列的第一格,里面的内容会自动加粗加黑他们
    jsp文件:
    <head>
    <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>
    </head>
    
    <body>
        <!-- <td>表示内容单元格 <th>则表示标题,一般用在一列的第一格,里面的内容会自动加粗加黑他们 -->
        <table class="table">
            <tr>
                <th>名称(value)</th>
                <th>出生时间(value)</th>
                <th>技能(value)</th>
            </tr>
            <tr>
                    <td align="center"><s:property value="name" /></td>
                    <td align="center"><s:property value="birth" /></td>
                    <td align="center"><s:property value="skill" /></td>
            </tr>
    
        </table>
    </body>

    to be continued

  • 相关阅读:
    使用Spring Cloud Gateway保护反应式微服务(二)
    使用Spring Cloud Gateway保护反应式微服务(一)
    浅谈Spring 5的响应式编程
    使用Spring Data JPA的Spring Boot
    在简单的JDBC程序中使用ORM工具
    Python爬虫
    数据库建模之概念模型、逻辑模型、物理模型
    机器学习(周志华)——学习笔记2
    HTTP——无状态协议理解
    Tomcat中文乱码问题
  • 原文地址:https://www.cnblogs.com/xingyyy/p/3448296.html
Copyright © 2020-2023  润新知