一行代码如何控制ipunt框里面值的长度 <input type="text" id="你的id" maxlength="你想要的长度" onkeyup="this.value=this.value.replace(/D/g,'')" />