温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

HTML5的表单标记

发布时间:2020-08-05 07:59:20 来源:网络 阅读:729 作者:A追途 栏目:web开发

第三天的笔记继续更新。

表单标记:
1、《form》宣告这是表单模式,是一个容器
2、《input》:单行文本域
3、《select》:滚动列表标签
4、《option》:滚动标签的围堵标记
5:、《textarea》:表单文字区域标记
例:
<!--from是表单标记,宣告这是表单模式,属于一个容器-->
<form>

    <!--单行文本域-->
    <input />

    <!--select滚动列表标志-->
    <select name="php" size="6" multiple="multiple"></select>

    <!--滚动标记select的围堵标记-->
    <option></option>

    <!--表单文字区域标记-->
    <br><textarea></textarea>

    关于《input》的一些参数:
    text:单行文本域
    radio“单选按钮”
    checkbox:复选框
    password:密码框
    submit:提交按钮
    reset:清除按钮
    image:图像域
    file:文件域
    hidden:隐藏域
    button:普通按钮

    <ol type="1" start="1">
    <li><form action="index.html" method="post"></form>
        <!--type的参数text:一个单行文本域-->
    <li><input  type="text" name="age" value="22" align="center" size="2" maxlength="255"/>
        <!--radio:单选按钮-->
    <li><input  type="radio" name="gender" value="female" align="middle" checked="checked" />
        <!--checkbox:复选框-->
    <li><input type="checkbox" name="idol" value="Leon" align="left" checked="checked" />
        <!--password:密码域-->
    <li><input type="password" name="pw" value="999" align="left" size="5" maxlength="9" />
        <!--submit:提交按钮、reset:清除按钮-->
    <li><input type="submit" name="ok" value="确定" align="left"/>
    <li><input type="reset" value="清除" align="left"/>
        <!--image:图像域-->
    <li><input type="image" name="submit"  align="bottom" src="img/HBuilder.png" />
    <!--file:文件域-->
    <li><input type="file" name="upload"  align="bottom" size="20" maxlength="100" accept="text/html" />
    <!--hidden:隐藏域-->
    <li><input type="hidden" name="ID" value="6618" />
    <!--botton:一般按钮-->
    <li><input type="button"  name="useless" value="ba" />
    </ol>   
    </form>

    <h2>滚动标记select和它的围堵标记option的用法如下</h2>
    <form action="index.html" method="post">
        where did you come from?
    <select name="1">
        <option value="2">hongkang</option>
        <option value="3" selected>taiwan</option>
        <option value="4">china</option>
        <option value="5">meiguo</option>
        <option value="6"> canada</option>
    </select>   
    </form>

    <br><form action="index.html" method="post">
        where did you come from?
    <select name="1" multiple>
        <option value="2">hongkang</option>
        <option value="3" selected>taiwan</option>
        <option value="4">china</option>
        <option value="5">meiguo</option>
        <option value="6"> canada</option>
    </select>   
    </form> 
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI