繁体   English   中英

移动键盘上字母数字的 html 5 输入类型

[英]html 5 input type for alphanumeric on mobile keyboard

我们已经看到,当在移动键盘上选择输入类型“文本”时,它会出现文本,当在移动键盘上选择输入类型“数字”时,它只会出现数字。 And when input type password fields are selected then it comes up with both alphabet and numbers. 当输入字段不是密码而是纯文本时,有没有办法在键盘上同时显示字母和数字?

像这样

希望你能得到我的询问。 谢谢。

有关移动设备上不同类型的键盘输入,请参阅示例。

最接近您愿望的键盘可能是“密码”键盘:

<input type="password">

尝试:

<input type="password" pattern="[0-9]*" inputmode="numeric"> 

在 html5.1 之前通过 css:

 input[type=number] {
    -webkit-text-security: disc;
}
*<form>
  <input type="number" pattern="[0-9]*" inputmode="numeric">
  <button type="submit">Submit</button>
</form>*

这也应该可以将类型作为数字

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM