限制input只能输入数字

<input type="number" onkeyup="this.value=this.value.replace(/D/g,'')">
原文地址:https://www.cnblogs.com/pcx105/p/12016387.html