【发布时间】:2012-07-12 23:00:57
【问题描述】:
我在 jQuery mobile 中实现了 iphone&android 应用程序。* 我使用了 **pure jQuery mobile
在文本框中输入电话号码。我使用 TYPE="TEL"' 这是数字键盘。
<input type="tel" style=" width:81%;" id="contactNumber" value="" class="ui-input-text ui-body-c ui-corner-all ui-shadow-inset" />
但用户也可以在文本框中输入文本,这是不必要的。
How can I prevent user from inserting characters other than numbers?
对于移动设备用户来说,如果唯一可能的输入是数字会更舒服,因为他们必须按每个按钮才能获得数字而不是字母!
我尝试在输入字段中添加TYPE=”TEL” TYPE=”mumber”,但无法阻止。
【问题讨论】:
标签: jquery html jquery-mobile cordova