Created
October 21, 2016 10:37
-
-
Save sampathsl/6bd14dcb766162ae9e234defe1511c96 to your computer and use it in GitHub Desktop.
How to restrict an input field to a numeric input field using JavaScript - implement the HTML input box
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
<input id="txtCurrency" name="txtCurrency" placeholder="" maxlength="10" class="numeric form-textbox" pattern="^(?:\d*\.\d{1,2}|\d+)" title="Value should be numeric with maximum two decimal points"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment