什么输入字段类型会强制数字键盘移动键盘在聚焦时出现? [英] what input field type forces the number pad mobile keyboard to come up when focused?

查看:19
本文介绍了什么输入字段类型会强制数字键盘移动键盘在聚焦时出现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了 <input type="number"/> 但在 Opera 上,它输出了一个奇怪的输入框和一个上下"处理程序.我期望的是一个普通的文本字段,一旦你专注于它,就会提示数字键盘而不是字母.这可能吗?

I tried the <input type="number" /> but on Opera that outputs a strange input box coupled with an "up and down" handler. What I expected was a regular text field that once you focus on it prompts the number keyboard instead of the alphabets. Is that even possible?

附言我不是要验证.这将是一个很好的用户体验,仅此而已.

p.s. I'm not trying to validate. It would be a nice user experience, that's all.

推荐答案

type="number" 是 HTML5,很多手机不支持 HTML5.对于呼叫链接,您可以使用 type="tel" 或<A href="wtai://wp/mc;600112233">特殊A</A>.你应该看看 CSS WAP扩展(第56页)太.

type="number" is HTML5 and many phones do not support HTML5. For call link you can use type="tel" or <A href="wtai://wp/mc;600112233">Special A</A>. You should look at CSS WAP extensions (page 56) too.

编辑 10/2015:
大多数(如果不是全部)智能手机都支持 HTML5 和 CSS3,所以 type="number" 是最好的方法.

EDIT 10/2015:
Most if not ALL smart phones support HTML5 and CSS3, so type="number" is the best way.

这篇关于什么输入字段类型会强制数字键盘移动键盘在聚焦时出现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆