美文网首页
form/label/input登录

form/label/input登录

作者: 富有的心 | 来源:发表于2017-11-20 15:42 被阅读0次
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title></title>
    <style type="text/css">
    body {
        background: url(images/bg.jpg) no-repeat;
        padding: 0;
        margin: 0;
        width: 1003px;
        height: 669px;
    }
    #apDiv1 {
        position: absolute;
        width: 428px;
        height: 182px;
        z-index: 1;
        left: 45px;
        top: 125px;
    }
    </style>
    </head>
    
    <body>
    <div id="apDiv1">
        <form id="form1" name="form1" method="post" action="">
            <h2>网站登录</h2>
            <label for="user">用户名</label>
            &nbsp;
            <input type="text" name="user" id="user">
            <br>
            <!-- label的for属性绑定了input的id属性,点击这个label就可以响应for属性值对应的具有相同id属性值的元素 -->
            <label for="pass">密&nbsp;&nbsp;&nbsp;码</label>
            &nbsp;&nbsp;
            <input type="password" name="pass" id="pass">
        </form>
    </div>
    </body>
    </html>
    
    

    input标签的type属性对应的值有:
    button
    checkbox
    file
    hidden
    image
    password
    radio
    reset
    submit
    text


    6D5D7453-EEC7-40F4-8A8F-01AE11F06D86.png

    相关文章

      网友评论

          本文标题:form/label/input登录

          本文链接:https://www.haomeiwen.com/subject/smmvvxtx.html