限制输入框只能输入数字

onkeyup="this.value=this.value.replace(/[^d]/g,'')"
原文地址:https://www.cnblogs.com/andy24/p/3541456.html