JavaScript Compruebe si la variable es número
function isNumber(n) {
return !isNaN(parseFloat(n)) && !isNaN(n - 0);
}
TC5550
function isNumber(n) {
return !isNaN(parseFloat(n)) && !isNaN(n - 0);
}
if(isNaN(num1))
OR:
if(typeof num1 == 'number'){
document.write(num1 + " is a number <br/>");
}else{
document.write(num1 + " is not a number <br/>");
}