Here Mudassar Ahmed Khan has explained with an example, how to perform Numeric validation i.e. allow only Numbers (Digits) using OnKeyPress event in jQuery.
When User types in the TextBox, the text in the TextBox will be validated using OnKeyPress event handler in jQuery and if the inputted character is not Numeric i.e. Numbers (Digits), the error message will be displayed next to the TextBox.
↧