您的位置:首页 > Web前端 > HTML

HTML表单input控件2

2017-10-26 09:14 302 查看
<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>其他type值</title>

</head>

<body>

    <form action="other.action">

        搜索框:

            <input type="search" name="search">

            <br>

        隐藏框:

            <input type="hidden" name="hiddenInput" value="hidden">

            <br>

        禁用框:

            <input type="text" disabled name="disabledInput" value="disabled">

            <br>

        只读:<input type="text" readonly name="readonlyInput" value="readonlyInput">

            <br>

            <button>提交</button>

    </form>

    <hr>

    <form action="up.action" enctype="multipart/form-data">

    选择头像:

        <input type="file" name="filepath">

        <br>

        <input type="submit">

        <input type="image" src="../day01/images/1.jpg"

                width="30px" height="30px" alt="图片显示不出来">

    </form>

    <hr>

    <form action="date.action">

    日期:

        <input type="date" name="date">

        <br>

    时间:

        <input type="time" name="time">

        <br>

    本地时间:

        <input type="datetime-local" name="local">

        <br>

    年-周:

        <input type="week" name="week">

        <br>

    年-月:

        <input type="month" name="month">

        <br>

    <hr>

    *tel:

        <input type="tel" name="tel" pattern="\d{4}" required>

        <br>

    年龄:

        <input type="number" name="number" step="5">

        <br>

    颜色:

        <input type="color" name="color">

        <br>

    url:

        <input type="url" name="url">

        <br>

    email:

        <input type="email" name="email">

        <br>

    滑块:

        <input type="range" name="range" max="100" value="30" step="10">

        <br>

    进度条:

        <progress max="100" value="30"></progress>

        <br>

    提交:

        <button>提交</button>

    </form>

    <hr>

    <form action="choose.action">

        <input type="radio" name="gender">女

        <input type="radio" name="gender" checked>男

        <select name="" id="">

            <option value="">请选择</option>

            <option value="">1</option>

            <option value="" selected>2</option>

            <option value="">3</option>

        </select>

        <br>

        <input type="text" required>

        <button>提交</button>

        <input type="submit" value="other"

                formaction="login.action"

                formmethod="post"

                formtarget="_blank"

                formnovalidate>

    </form>

</body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: