I have implemented iphone and android application in jQuery mobile. * I used ** pure jQuery mobile
Enter your phone number in the text box. I used TYPE = "TEL", this is for a numeric keypad.
<input type="tel" style=" width:81%;" id="contactNumber" value="" class="ui-input-text ui-body-c ui-corner-all ui-shadow-inset" />
But the user can enter text and a text field that is not necessary.
How can I prevent user from inserting characters other than numbers?
It would be much more convenient for users of mobile devices if the only input option was numeric, since they had to press each button to get a number, not a letter!
I tried adding TYPE="TEL" TYPE="mumber"to the input field, but it does not work to prevent.
source
share