Following is the javascript function which accurately validates if the supplied string a valid number or not.
function isNumber(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
function isNumber(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
No comments:
Post a Comment
Thanks for visiting my blog.
However, if this helped you in any way, please take a moment to write a comment.
Thanks
Nirman