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

}

 

相关文章: