html - 输入类型编号在 Window Surface 平板电脑上不起作用

标签 html windows google-chrome input tablet

我注意到如果我们尝试打开 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/

相关文章:

javascript - 在移动设备中删除 HTML <a> 标记的 URL 的查询字符串

适用于 Windows 7 的 Python GObject 自省(introspection)

Python 多处理和全局变量

c++ - 保护生成的源文件

javascript - Chromium 上的 HEAD XMLHttpRequest

javascript - 是否可以在 chrome 调试器中操作返回值?

html - tabindex ="0"HTML 元素在 Tab 键顺序中在哪里结束?

html - 物化CSS。如何在下拉内容顶部添加三 Angular 形

html - 为什么这个中间元素的边距与顶部元素重叠而不是底部元素?

javascript - 如何检查特定页面是否已在 Google Chrome 中打开?