文本框内不允许输入字母
View Code
1 <asp:TextBox ID="tbP_newYear" MaxLength="3" runat="server" onkeyup="this.value=this.value.replace(/\D/g,'')"
2 onafterpaste="this.value=this.value.replace(/\D/g,'')"></asp:TextBox>