控制input框输入非数字

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

 

posted @ 2018-08-27 15:45  青芒灬  阅读(331)  评论(0编辑  收藏  举报