正文input el-input 只能输入正整数验证IP云V管理员/2022-07-29/4 阅读 07/29提示:扫一扫查出行【扫一扫了解最新限行尾号】复制提示 字母e在js中属于数字,所以一般的正则匹配 \d 是拦不住字母e 的正确写法为:onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"