You can use the jQuery $.isNumeric() method to check whether a value is numeric or a number.
The $.isNumeric() returns true only if the argument is of type number, or if it's of type string and it can be coerced into finite numbers, otherwise it returns false.
Let's take a look at the following example to understand how it basically works:
Use the
jQuery.isNumeric()methodYou can use the jQuery
$.isNumeric()method to check whether a value is numeric or a number.The
$.isNumeric()returnstrueonly if the argument is of type number, or if it's of type string and it can be coerced into finite numbers, otherwise it returnsfalse.Let's take a look at the following example to understand how it basically works:
need an explanation for this answer? contact us directly to get an explanation for this answer