Hope this helps someone.
//following function is used to check for a numeric value
function is_numeric(numVal) {
return (typeof(numVal) === "number" || typeof(numVal) === "string") && numVal != "" && !isNaN(numVal);
}
var testThis = "123";
//check as follows
alert(is_numeric(testThis));
//returns true
No comments:
Post a Comment