HTML5 input box type in mobile development

Source: Internet
Author: User

The HTML5 specification introduces a number of new input box types

In HTML5 Mobile development, these new input box types show customized keyboard layouts, better user experience and easier filling of forms

In this paper, the measured cell phone is kidney 4S and M 4

Numeric type number

When you define the input type as type= "number", iOS displays numbers, punctuation, and symbol keyboards, and Android displays the dial pad. The code looks like this

<input type= "number" id= "number" name= "number"/>

Phone Type Tel

When you define the input type type= "Tel", both iOS and Android display the dial pad. The code looks like this

<input type= "Tel" id= "Tel" name= "Tel"/>

e-Mail Type email

When you define an input type of type= "email", both iOS and Android display letters and email symbol keyboards. The code looks like this

<input type= "Email" id= "email" name= "email"/>

Link Type URL

When you define the input type as type= "url", both iOS and Android display letters and link symbol keyboards. The code looks like this

<input type= "url" id= "url" name= "url"/>

Day Type Date

When you define the input type as type= "date", both iOS and Android display date pickers, which vary greatly in style. The code looks like this

<input type= "Date" id= "date" name= "date"/>

Time Type

When you define the input type as type= "Time", both iOS and Android display the timing picker, which varies greatly in style. The code looks like this

<input type= "Time" id= "Time" name= "Time"/>

Date Time Type datetime

When you define an input type of type= "datetime", the iOS call fails, and Android displays the date time picker in turn. The code looks like this

<input type= "datetime" id= "datetime" Name= "datetime"/>

Months Type Month

When you define the input type as type= "month", iOS displays the month picker, and Android displays the date picker but only the year and month are recorded. The code looks like this

<input type= "Month" id= "month" name= "month"/>

iOS keyboard layout is basically the same, Android different phone keyboard layout will have some discrepancies

HTML5 input box type in mobile development

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.