js 判斷是不是數字

轉載: https://www.cnblogs.com/maxm/p/6743989.htmljavascript 方法一:isNaN isNaN()的缺點就在於 null、空格以及空串、’[123]'會被按照0來處理 NaN: Not a Numberhtml function isRealNum(val){ // 先斷定是否爲number if(typeof val !== '
相關文章
相關標籤/搜索