[英]Phonegap Android force numeric keyboard on input
I'm using 我正在使用
-webkit-user-modify: read-write-plaintext-only;
on my input fields in my app to prevent several behavior with android ICS but i would like to force the numeric keyboard to show up on specific inputs. 在我的应用程序的输入字段中,以防止Android ICS出现多种行为,但我想强制数字键盘显示在特定输入上。 And i want to keep the CSS line.
而且我想保留CSS行。
Is there a way to do it ? 有办法吗? by modifying some classes in the .java files ?
通过修改.java文件中的某些类? Or maybe is there another way ?
也许还有另一种方法?
Thanks 谢谢
On HTML5 (as you're talking on Java mods, I wrote this to be clear): 在HTML5上(正如您在谈论Java mod一样,我写得很清楚):
The only way to trigger the numeric keyboard on Android devices is to use <input type="number">
or <input type="tel">
. 在Android设备上触发数字键盘的唯一方法是使用
<input type="number">
或<input type="tel">
。 That comes with some small problems, especially if you're dealing with Angular or with HTML5 native validation, but for the general use this should be no problem. 这带来了一些小问题,特别是如果您正在使用Angular或HTML5本机验证,但是对于一般用途而言,这应该没有问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.