Is it okay to use <input type=“tel”/> now?

前端 未结 3 1705
野的像风
野的像风 2020-12-08 03:21

I\'m working on a mobile phone web app and I have several text fields that could benefit from . iPhones will adjust the keyboard for

相关标签:
3条回答
  • Yes, any unsupported type will revert to the 'type=text' format.

    I found a good page which lists out all the existing input types. I tried looking at it from different browsers, a bit interesting. Don't know if it will help you or not.

    http://miketaylr.com/pres/html5/forms2.html

    0 讨论(0)
  • 2020-12-08 04:07

    Browsers will fall back to type="text" when they encounter unsupported input type. So I think it's OK to use type="tel".

    0 讨论(0)
  • 2020-12-08 04:18

    Short answer: yes. As @el.pescado mentions, browsers fall back to type=text when they don't undertand the type. For more info about the other cool features you get from HTML5 forms, check out A Form of Madness, which is the forms chapter in Dive Into HTML5.

    0 讨论(0)
提交回复
热议问题