A Preliminary Study on HTML5 -- new form elements and attributes

Source: Internet
Author: User

A Preliminary Study on HTML5 -- new form elements and attributes

A Preliminary Study on HTML5 -- new form elements and attributes

    
     HTML5 mobile Web Development Guide        
         
  
   
HTML5 mobile Web Development Guide
      
     
         
  HTML5 new element-form Element                    
                  
   
Placeholder attribute: It is generally used in the text box. Its main function is to prompt the content effect of the text box when the text box is not entered and the content is empty: when the text box gets the focus, the prompt information is automatically cleared, when the focus is lost and NO content is entered, the prompt information automatically appears, saving traditional text boxes that can be achieved through the onfocel and onblur events (compatible with most PC and Mobile browsers, it can only be said that technology has indeed improved.) Example:               
Autofocus attribute: specifies that the control automatically obtains the focus. Note that only one control on an HTML page can have an example of modifying the attribute:                 
List and datalist elements: the main function of the list element is to prompt text box input. The prompted data source is provided by datalist. Currently, the list and datalist elements are only supported by the Opera Browser, no mobile browser supports this feature example:                                  I am datalist1                   I am datalist2                   I'm datalist3.                   I'm datalist4.                              
Search Text Box: it is mainly used to search for the keyword text box. This text box is the only difference from a common text box. In Safari and Chrome, the text box looks like a rounded corner. Example:               
Email text box: it is a text box that can specify the content of an email. It is usually used in the input text box that inputs the e-mail address. This text box is similar to a common text box in appearance, in fact, the Safari mobile browser has a different keyboard. The keyboard will display the corresponding keyboard example based on the text box type:               
Number text box: it is a text box type used to enter numbers. It can be used with min, max, and step attributes. Example:               
Range text box: it is a type of Value range Input text box. It provides an example of using the sliding input mode with attributes such as min, max, and range:               
Tel text box: it is a text box type for users to enter phone numbers. In a mobile browser, the keyboard displays the corresponding keyboard example based on the text box type:               
Url text box: it is a text box type for users to enter the Url address. In a mobile browser, the keyboard displays the corresponding keyboard example based on the text box type:               
In HTML5 specifications, in addition to new form elements, there are also input elements of the date and time types, but these types are not widely supported as follows: Date and time (including the time zone ):Date and time (excluding the time zone ):Time selector text box:Date selector text box:Year week selector text box:Month selector text box:               
HTML5 new element-form Element



Related Article

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.