Article introduction of Wulin.com (www.vevb.com): XHTML5 example: HTML5 form verification.
When the web page is loaded, the cursor automatically focuses on the place where the user needs to enter, such as entering the user name on the email login page. Before, we needed to use javascript code to specify a certain input box to get the focus when the web page is onloaded. Now html 5 directly supports adding the autofocus attribute to the input box.
1<input type=text id=username name=username autofocus />
Before, we needed to use JavaScript's onblur and onfocus to implement the prompt information of an input box, but now we only need to add a placeholder attribute.
1<input type=email id=uemail name=uemail [email protected] required />
Required items for judgment
Determine the data format
You can drag directly, which can set the minimum value, maximum value, and step size for each drag.
1<input type=range min=1 max=100 step=10 name=s />
You can directly add or subtract operations by clicking the up and down arrows on the right.
It can be used as a popular ajax input prompt now, or as an editable drop-down menu. You can enter it yourself or directly pull down to select.
1<input id=search type=url list=searchlist required />
2<datalist id=searchlist>
3<option value= label=Google />
4<option value= label=Yahoo />
5<option value= label=Bing />
6<option value= label=Baidu />
7</datalist>
Complete DEMO: Please use the latest version of Chrome+Oprea to browse together to see all the effects