Skip to content

Instantly share code, notes, and snippets.

@movii
Last active August 29, 2015 14:02
Show Gist options
  • Save movii/266cd412f0e3a2aafc00 to your computer and use it in GitHub Desktop.
Save movii/266cd412f0e3a2aafc00 to your computer and use it in GitHub Desktop.
on safari of iOS , this line of attributes in the html input element will get number keyboard out; in this case, it will also force the max-length for the input length to be four character long.
<input type="text" value="" id="getNumberKeyboard" maxlength="4" pattern="[0-9]*">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment