js 数字

var text = $("#iptNum").val();
if(isNaN(text)){
    alert("不是数字");    
}
else{
    alert("是数字");
}
原文地址:https://www.cnblogs.com/flywing/p/4188068.html