input输入框只能输入数字而且开头不能为零

<div class="input-choseNum">
<input type="number" id="inp-chooseNum" oninput='this.value=this.value.replace(/^[0]+[0-9]*$/gi,"")' maxlength="5" />
<span class="sureChoose">确定</span><span class="closeChoose">取消</span>
</div>

posted @ 2017-03-23 20:00  春风得意之时  阅读(9298)  评论(0编辑  收藏  举报