onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"

在input  type="number"  中添加 上面这段代码