02-08-2010

Javascript simple isnumber function in JS

you can use the following function to check whether any JavaScript value is a valid number :

var isNumeric = function(nr){
	return ( (typeof (nr) === typeof(1)) && (null !== nr) && isFinite(nr));
}

Comments:

Your comment:

»

 

[x]