我注意到如果我们尝试打开 https://www.w3schools.com/html/tryit.asp?filename=tryhtml_input_number
在 Windows Surface 平板电脑上的 Chrome 中,它的行为与在桌面浏览器中一样。
我的意思是在平板电脑(移动)设备上,如果我点击 <input type="number">
比 Chrome 会显示数字键盘。但在 Surface Chrome 上会显示文本键盘。
In addition, mobile browsers further help with the user experience by showing a special keyboard more suited for entering numbers when the user tries to enter a value. developer.mozilla.org
有没有办法强制 Windows Surface 上的 Chrome 充当移动浏览器?至少对于数字字段?
最佳答案
我没有带 Chrome 的 Windows Surface 可以测试,但试试
<input inputmode="numeric" pattern="[0-9]*" type="text" name="something">
这仍然会强制浏览器打开数字键盘
关于html - 输入类型编号在 Window Surface 平板电脑上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49033741/