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

标签 html text input alphanumeric

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

Like this

希望您能收到我的询问。 谢谢。

最佳答案

尝试:

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

在 html5.1 之前通过 css:

 input[type=number] {
    -webkit-text-security: disc;
}

关于移动键盘上字母数字的html 5输入类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37651443/

相关文章:

linux - 处理包含数字和字符串的文本文件 shell 脚本

javascript - 根据某些条件禁用或启用按钮

JavaScript 按钮相互冲突

jquery - jQuery 中的嵌套点击

html - div不应该重叠

javascript - jQuery 中的编号

text - 多行标签/ TextView 中行高的 xib 控件

javascript - jQuery 函数仅适用于一次 Html5 自动对焦

html - CSS 添加背景图片不起作用

javascript - react 未知 Prop 'onSearch'