经过几个小时的搜索后,我只是有一个简单的问题:是否有可能在网络浏览器输入字段中显示小数键盘?input type="number"
只显示数字,但我需要在左下角使用逗号或点。
我尝试过任何事情,pattern
, step
等等,但没有显示十进制键盘。我只需要数字和一个点或逗号,不需要 A-Z 或 a-z 或其他任何东西。
<input type="number" id="inputNumbers" pattern="[0-9]*" size="30" min="1" max="5">
This is what i get:
This is what i want:
查看inputmode="decimal"
从 iOS 12.2 开始
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
https://caniuse.com/#feat=input-inputmode https://caniuse.com/#feat=input-inputmode
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)