As following example
var m="hello" or var m="50"
check the string whether the string got Numeric Value or Alphabet's
i am using this but it is not working
var check=parseInt(m);
if(Number(check)==NaN)
{
alert("this is Not a Number ");
} else{
alert("This is Number ");
}
NaN == NaNresults infalse. Use theisNaNfunction.parseIntis unnecessary; all you need isif (isNaN(check)) {...}0x16a valid numeric string for you? If you mean to only look for valid decimal values then it's not. And to catch that you'd have toparseInt(m,10). Although actually, even that wouldn't work because it will parse up to the first non-numeric character and return0.