输入框只能输入数字

<input type="text" class="form-control divValue" id="iptBuyPrice" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">

  

posted @ 2016-03-03 19:05  562323273  阅读(112)  评论(0编辑  收藏  举报