JQ 文本框只能输入正数字

 

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

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

 

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