判断是否是NaN

if (isNaN(parseInt(x))) {

alert("非数字");

else{

alert("数字");

}

posted @ 2018-03-14 14:20  boyanh  阅读(917)  评论(0编辑  收藏  举报