html5 input type number with regex pattern in mobile

后端 未结 5 1547
后悔当初
后悔当初 2020-12-08 13:35

I\'m trying to get regex pattern in input type number to show only numbers and dots. I tried something like this.



        
5条回答
  •  星月不相逢
    2020-12-08 14:05

    For iOS use the input attribute type="number", inputmode="decimal". This will show the number pad with the “dots” on iOS 12.3+.

提交回复
热议问题