`

html5 form的应用

阅读更多
<form>
    <!-- entry end -->
    <div>
        <label for="form-1">Name (required) </label>
        <input id="form-1"  name= "haha" type="text" autofocus required>
        &larr; autofocus here </div>
    <!-- entry end -->
    <div>
        <label for="form-2">Title</label>
        <input id="form-2"   list="mylist" type="text">
        <datalist id="mylist">
            <option label="Mr" value="Mr">
            <option label="Ms" value="Ms">
            <option label="Prof" value="Mad Professor">
        </datalist>
    </div>
    <!-- entry end -->
    <div class="entry">
        <label for="form-4">Shoesize</label>
        <input id="form-4"  name="age" type="number" min="18" max="25">
    </div>
    <!-- entry end -->
    <div>
        <label for="form-5">Email (required)</label>
        <input id="form-5"  name="email" type="email" required>
    </div>
    <!-- entry end -->
    <div>
        <label for="form-6">Webpage</label>
        <input id="form-6"  name="url" type="url">
    </div>
    <!-- entry end -->
    <div >
        <label for="form-7">Date of Birth</label>
        <input id="form-7"  name="dob" type="date">
    </div>
    <!-- entry end -->
    <div>
        <label for="form-8">Attractiveness </label>
        <input id="form-8"  name="a" type="range" min="1" max="10" value="0">
        <output name="result"  onforminput="value=a.value"  >0</output>
    </div>
    <!-- entry end -->
    <div class="button">
        <button type=submit>Submit</button>
    </div>
</form>


强大的html5 form表单。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics