zoukankan      html  css  js  c++  java
  • html简单介绍(二)

    表格

    table标签:
    border:表示边框的大小

    <table border="1">
    <tr>
    <td>row(行1), cell(列1)</td>
    <td>row(行1), cell(列1)</td>
    </tr>
    <tr>
    <td>row(行2), cell(列2)</td>
    <td>row(行2), cell(列2)</td>
    </tr>
    </table>

    合并行时用: 后面的行就不用写女啦
    <td rowspan="2">女</td> 
    合并列是用:

    <td colspan="2">66 , 已婚</td>
    
    <table border="1">
    <thead>
    <tr>
    <th>IP</th>
    <th>DNS BOOL</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>1.1.1.1</td>
    <td>True</td>
    </tr>
    <tr>
    <td>2.2.2.2</td>
    <td>False</td>
    </tr>
    </tbody>
    </table>

    表单

    表单元素是允许用户在表单中(比如:文本域、下拉列表、单选框、复选框等等)输入信息的元素
    文本:

    <form>
    username:<input type = "text" name = "username" />
    <br />
    password:<input type = "password" name = "password" />
    <br />
    <textarea cols="11" rows="10"></textarea>
    </form>

    单选

    <form>
    <input type = "radio" name = "sex" value = "男" /><br />
    <input type = "radio" name = "sex" vulue = "女" /><br />
    </form>

    多选

    <form>
    <input type = "checkbox" name = "111" />1 <br />
    <input type = "checkbox" name = "222" />2 <br />
    <input type = "checkbox" name = "333" />3 <br />
    <input type = "checkbox" name = "444" />4 <br />
    </form>

    下拉列表

    disabled = "disabled" 禁用该下拉列表
    size = "2" 下拉列表可见选项的数目

    <form>
    <select name = "list" disbaled = "disabled"size = "4">
    <option>list1</option>
    <option>list2</option>
    <option>list3</option>
    </form>

    当用户单击确认按钮时,表单的内容会被传送到另一个文件。表单的动作属性定义了目的文件的文件名。

    <form action = "html.do" method = "get">
    username:<input tyep = "text" name = "username" />
    <input type = "submit" value = "提 交" />
    </form>
  • 相关阅读:
    java中使用MD5加密的算法
    [转]自定义注释@interface的用法
    [转]Spring IOC详解
    [转]sed命令详解
    SimpleDateFormat线程不安全问题处理
    Unable to locate the Javac Compiler 解决办法
    MySQL ERROR 1045错误解决办法
    Python装饰器学习(九步入门)
    python 可变参数函数定义* args和**kwargs的用法
    如何更好的利用Node.js的性能极限
  • 原文地址:https://www.cnblogs.com/yangjian319/p/9307783.html
Copyright © 2011-2022 走看看