Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将输入字段写为type="number". 它在 iphone 上显示数字和一些特殊字符,如(,)等键盘。
type="number"
(
)
但是,如果我单击(,它会自动将其删除并仅显示数字。
我必须制作显示数字键盘的应用程序,并且不仅可以输入数字,还可以输入一些特殊字符,如(, ), white-space, ',"等。我希望你能帮助我。
white-space
'
"
PS。我正在使用cordova2.8.1
Instead of using <input> tag with type number you can use Sencha touch xtype: numberfield in following way, it would give result as u expect:
<input>
{ xtype: 'numberfield', label: 'Phone Number', labelAlign:'top', component: { xtype: 'input', type: 'tel' }, },