HTML 表单的用法

2017-03-11  本文已影响0人  S级食材咩咩羊
<!DOCTYPE html>
<html>
<head>
    <title>task5</title>
</head>
<body>
    <form action="" method="post">
        <div class="username">
            <label>姓名:</label>
            <input type="text" name="username" placeholder="用户名"></input>
        </div>
        <div class="password">
            <label>密码:</label>
            <input type="password" name="password" ></input>
        </div>
        <div class="sex">
            <label>性别:</label>
            <input type="radio" name="sex" value="male" checked></input>男
            <input type="radio" name="sex" value="female"></input>女         
        </div>
        <div class="love">
            <label>取向:</label>
            <input type="radio" name="love" value="male"></input>男
            <input type="radio" name="love" value="female" checked></input>女            
        </div>
        <div class="hoppy">
            <label>爱好:</label>
            <input type="checkbox" name="hoppy" value="data"></input>data
            <input type="checkbox" name="hoppy" value="travel" checked></input>旅游
            <input type="checkbox" name="hoppy" value="pet" checked></input>宠物          
        </div>
        <div class="comment">
            <label>评论:</label>
            <textarea name="comment" placeholder="ddd"></textarea>
        </div>
        <div class="car">
            <label>我的car:</label>
            <select>
                <option value="BMW">BMW</option>
                <option value="sabo" selected>萨博</option>
            </select>
            <button>提交</button>
        </div>

    </form>
</body>
</html>
Paste_Image.png
上一篇 下一篇

猜你喜欢

热点阅读