The input property controls the pop-up keyboard type

Source: Internet
Author: User

/**
* iOS bounces up the numeric keypad in three ways
* 1. <input type= "Number" > can play the keyboard with a decimal point, you can not clean the keyboard, there are other kinds of characters, can switch input method
* 2. <input type= "Tel" > can play up a pure numeric keypad, add #* special characters, can not switch input method, but no decimal point
* 3. <input type= "text" pattern= "\d*" > can play only the number of keyboard, non-switchable input method, no decimal point
*
* Android is not the same as iOS:
* 1. Tel type has decimal point
* 2. Pattern not supported
*/
/**
* Control Keyboard lift
* iOS8 can use <input Autofocus>, and automatically raise the keyboard without user action, the Android system is just the focus cursor, does not play the keyboard
* When the user has clicked, you can make the keyboard pop up by calling the focus method
* Lowering the keyboard requires calling Blur and focus to another a tag
*
* Also a more strange point in click event = "such as page roll, keyboard does not drop, etc.
* It is estimated that many things have been done before the system triggers the Click event, so it is good to preventdefault and simulate tap in Touchend.
*
*/

The input property controls the pop-up keyboard type

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.