正在浏览:正整数

js判断是否为正整数函数: function isPositiveInt(s){var re = /^[0-9]+$/ ;return re.test(s)} 使用方法: console.log(isPositiveInt(number));