输入框只允许输入数字

<input onkeyup="this.value=this.value.replace(/D/g,'')"

原文地址:https://www.cnblogs.com/chinaboyzzy/p/6392537.html