【JS】【28】让输入框只能输入正整数

<input type='text' onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">

 

posted @ 2019-06-19 09:19  花生喂龙  阅读(8436)  评论(0编辑  收藏  举报