文本框只能填数字

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

原文地址:https://www.cnblogs.com/yubufan/p/4299728.html