Last active
June 21, 2018 04:12
-
-
Save davebra/7e789e5c31337e0e05dc0ac6e52881db to your computer and use it in GitHub Desktop.
Input type for numbers mobile numpad keyboard (useful for credit cards)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label for="tel">Tel</label> | |
<input id="tel" type="tel"> | |
<label for="telp">Tel pattern=[0-9]*</label> | |
<input id="telp" type="tel" pattern="[0-9]*"> | |
<label for="nump">Number pattern=[0-9]*</label> | |
<input id="nump" type="number" pattern="[0-9]*"> | |
<!-- preferred for semantic and compatibility --> | |
<label for="textp">Text pattern=[0-9]*</label> | |
<input id="textp" type="text" pattern="[0-9]*"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment