亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

JS開(kāi)發(fā)驗(yàn)證表單教學(xué)樣式(一)

下面我們來(lái)看html程式碼

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
</head>
<body>
    <div id="div">
        <form>
            <label>用戶(hù)名:</label>
            <input type="text" class="name" id="name">
            <div id="sp" class="div"></div>                
            <label>密 碼:</label>
            <input type="password" class="pwd" id="pwd">
            <div id="sp1" class="div"></div>
            <label>郵 箱:</label>
            <input type="text" class="email" id="email">
            <div id="sp2" class="div"></div>
            <label>愛(ài) 好:</label>
            <textarea rows="5" cols="40" class="txt" id="txt"></textarea>
            <div id="sp3" class="div"></div>
            <input type="button" class="sub" value="注冊(cè)" id="sub">
        </form>
    </div>
</body>
</html>

基本的佈局程式碼如下:

<style type="text/css">
        *{margin:0;padding:0;}
        #div{width:410px;height:400px;background:#46a3ff;padding-left:16px;
            padding-top:20px;}
        .name{width:200px;height:30px;margin-left:8px;border:1px solid #ffc1e0;}
        .pwd{width:200px;height:30px;margin-left:8px;border:1px solid #ffc1e0;}
        .email{width:200px;height:30px;margin-left:8px;border:1px solid #ffc1e0;}
        .txt{width:280px;height:70px;margin-left:8px;border:1px solid #ffc1e0;}
        .sub{width:100px;height:30px;padding-left:0px;}

        .sub:hover{background:#ffaad5;}
        .div{width:200px;height:30px;margin:0 auto;padding-left:45px;padding-top:5px;color:#8600ff;font-weight:bold;
           }
    </style>

完整程式碼如下:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <style type="text/css">
        *{margin:0;padding:0;}
        #div{width:410px;height:400px;background:#46a3ff;padding-left:16px;
            padding-top:20px;}
        .name{width:200px;height:30px;margin-left:8px;border:1px solid #ffc1e0;}
        .pwd{width:200px;height:30px;margin-left:8px;border:1px solid #ffc1e0;}
        .email{width:200px;height:30px;margin-left:8px;border:1px solid #ffc1e0;}
        .txt{width:280px;height:70px;margin-left:8px;border:1px solid #ffc1e0;}
        .sub{width:100px;height:30px;padding-left:0px;}

        .sub:hover{background:#ffaad5;}
        .div{width:200px;height:30px;margin:0 auto;padding-left:45px;padding-top:5px;color:#8600ff;font-weight:bold;
           }
    </style>
    </style>
</head>
<body>
    <div id="div">
        <form>
            <label>用戶(hù)名:</label>
            <input type="text" class="name" id="name">
            <div id="sp" class="div"></div>                
            <label>密 碼:</label>
            <input type="password" class="pwd" id="pwd">
            <div id="sp1" class="div"></div>
            <label>郵 箱:</label>
            <input type="text" class="email" id="email">
            <div id="sp2" class="div"></div>
            <label>愛(ài) 好:</label>
            <textarea rows="5" cols="40" class="txt" id="txt"></textarea>
            <div id="sp3" class="div"></div>
            <input type="button" class="sub" value="注冊(cè)" id="sub">
        </form>
    </div>
</body>
</html>


#
繼續(xù)學(xué)習(xí)
||
<!DOCTYPE html> <html> <head>     <meta charset="utf-8">     <title></title>     <style type="text/css">         *{margin:0;padding:0;}         #div{width:410px;height:400px;background:#46a3ff;padding-left:16px;             padding-top:20px;}         .name{width:200px;height:30px;margin-left:8px;border:1px solid #ffc1e0;}         .pwd{width:200px;height:30px;margin-left:8px;border:1px solid #ffc1e0;}         .email{width:200px;height:30px;margin-left:8px;border:1px solid #ffc1e0;}         .txt{width:280px;height:70px;margin-left:8px;border:1px solid #ffc1e0;}         .sub{width:100px;height:30px;padding-left:0px;}         .sub:hover{background:#ffaad5;}         .div{width:200px;height:30px;margin:0 auto;padding-left:45px;padding-top:5px;color:#8600ff;font-weight:bold;            }     </style>     </style> </head> <body>     <div id="div">         <form>             <label>用戶(hù)名:</label>             <input type="text" class="name" id="name">             <div id="sp" class="div"></div>                             <label>密 碼:</label>             <input type="password" class="pwd" id="pwd">             <div id="sp1" class="div"></div>             <label>郵 箱:</label>             <input type="text" class="email" id="email">             <div id="sp2" class="div"></div>             <label>愛(ài) 好:</label>             <textarea rows="5" cols="40" class="txt" id="txt"></textarea>             <div id="sp3" class="div"></div>             <input type="button" class="sub" value="注冊(cè)" id="sub">         </form>     </div> </body> </html>
提交重置程式碼