JavaScript 正整数正则表达式

function testNumber(){

var yourinputValue=$("#yourinputId").val();

var reg = /^[1-9]\d*$/;

alert(reg.test(yourinputValue))

}