function isNumber(x) {
if(typeof x == 'number'){
return true;
}
return /^[0-9]+(\.[0-9]*)?$/.test(x);
}
js 是否数字型验证
最新推荐文章于 2023-11-26 02:05:30 发布
function isNumber(x) {
if(typeof x == 'number'){
return true;
}
return /^[0-9]+(\.[0-9]*)?$/.test(x);
}