<input onkeyup="value=value.replace(/[^\d]/g,‘‘)">
input限制整数
原文:https://www.cnblogs.com/zhangxiangdong/p/9372098.html