文本框内不允许输入字母

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>
posted @ 2012-02-08 17:36  志誠  阅读(220)  评论(0编辑  收藏  举报