JQ 文本框只能输入正数字

 

正整数:onkeyup="this.value=this.value.replace(/[^0-9]+/,'');"

可负数:onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');"

 

posted @ 2019-05-09 17:21  chendashuo  阅读(525)  评论(0编辑  收藏  举报