HTML5 - 打开数字键盘iPhone

时间:2012-12-14 15:13:37

标签: iphone html html5 input

  

可能重复:
  HTML5 Form Input Pattern Currency Format

有没有办法使用input type =“text”打开数字键盘?我知道type =“number”会打开数字键盘,但不会取钱。例如,如果输入1.00,则在iOS产品上变为1。此外,这仅在iOS设备上发生。它适用于Android和所有网络浏览器。

我试过玩模式和模式=“[1-9] *”打开电话号码簿。是否有可能会打开数字键盘?

2 个答案:

答案 0 :(得分:3)

尝试使用它,这应该在iOS中打开数字键盘(并在Android中打开数字输入键盘):

<input type="number" step="0.01">

答案 1 :(得分:0)

回答:

  1. 是输入类型=“文字”存在于html5 http://www.w3schools.com/html/html5_form_input_types.asp

  2. type =“number”可以使用jquery .toFixed(2) http://www.w3schools.com/jsref/jsref_tofixed.asp

  3. 格式化为两位小数
  4. jquery mobile不是您选择的语言,但它会为某些输入自定义键盘,例如date您可能想尝试一下,它与html http://jquerymobile.com/

  5. 非常相似
相关问题