<input type="text">
brings up this keyboard:
while <input type="number">
brings up this one:
Is there a way to keep the input type text and invoke the second keyboard? perhaps with a pattern attribute?
My issue with input type="number" is that the user is expected to input fractions and $("#input_id").val();
is having trouble with space and forward slash, eg 3 5/6
returns 3
and 7/13
returns 7
.
if this can be bypassed i can also work with that.
<input type="text">
will always invoke primary keyboard.
What you can do is:
[0-9][.][0-9]{1-2}
returns true for one or two decimal places.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.