HTML5 Smart Form

Source: Internet
Author: User

1: Form form for easy typesetting
HTML5 in order to facilitate the layout, you can make form label from form nested.
Method: The form specifies the ID, and all label tags are added with the form= id attribute.
For example:
<form action= "" method= "POST" id= "register" ></form>
<input type= "text" name= "user" value= "form=" register "/>
<input type= "password" name= "pwd" value= "" form= "register"/>


2:form New Type
Type = "Email" Mailbox (self-formatted check)
Type = "url" url, must be with protocol (self-formatted check)
Type = "Date" Day selector
Type = "Time" Time Picker
Type = "Month" Month Selector
Type = "Week" Week Selector
Type = "Number" digital selector
Type = "Range" Slide Bar
Max Property
Step property (validation legitimacy) step= "2", for example starting from 0, can only select 0-2-4-6-8
Type = "Search" Search box
Results= "N" is available in Google Chrome and displays the search icon.
Type = "Color" Color Picker


3: New Form Properties
Required= "required" setting required
placeholder = "I am the default" setting the default value and will not be submitted to the background
Autofocus = "Autofocus" Auto focus
Pattern= "\d{3}" custom Regular expression




4: Auto-populate form
<input type= "text" name= "Auto" value= "" list= "movie"/>
<datalist id= "movie" >
<option> people in the embarrassing way </option>
<option> cars in the embarrassing </option>
<option> Thai Embarrassment </option>
</datalist>

5:output Label


<form action= "" method= "POST"
Oninput= "Result.value=parseint (no1.value) +parseint (no2.value)" >
<input type= "number" Name= "No1" value= "/>
<input type= "number" name= "NO2" value= "/>
<output name= "Result" ></output>
</form>

HTML5 Smart Form

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.