首页 > 技术文章 > JS常用数值验证
zys2019 2020-12-07 21:47 原文
正整数是大于0的整数。
function validateInteger(val) { return Number.isInteger(val) && val > 0 }
2.