js正整数正则表达式

function testNumber(){ 
  var yourinputValue=$("#yourinputId").val();
  var reg = /^[1-9]d*$/;
 alert(reg.test(yourinputValue))

}
原文地址:https://www.cnblogs.com/Byme/p/7718134.html