js 判断数字是NaN

//isNaN()函数判断是否是NaN

if (isNaN(parseInt(x))) {

alert("非数字");

else{

alert("数字");

}

</script>

</html>

posted @ 2017-06-16 17:30  贝宝纸  阅读(923)  评论(0)    收藏  举报