js判断是否为正整数函数:
function isPositiveInt(s){
var re = /^[0-9]+$/ ;
return re.test(s)
}
使用方法:
console.log(isPositiveInt(number));
(adsbygoogle = window.adsbygoogle || []).push({});
来源:https://www.02405.com/archives/1611
js判断是否为正整数函数:
function isPositiveInt(s){
var re = /^[0-9]+$/ ;
return re.test(s)
}
使用方法:
console.log(isPositiveInt(number));
来源:https://www.02405.com/archives/1611