限制TxtBox输入内容
<1>只能输入英文和数字
<asp:TextBox ID="txt_AffrimPassword" runat="server" MaxLength="12" onkeyup="value=value.replace(/[\W]/g,'')"></asp:TextBox>
onkeyup="value=value.replace(/[\W]/g,'')"
<2>只能是数字
<asp:TextBox ID="txt_AffrimPassword" runat="server" MaxLength="12" onkeyup="value=value.replace(/[\d]/g,'')"></asp:TextBox>
onkeyup="value=value.replace(/[\d]/g,'')"
<3>只能用中文
<asp:TextBox ID="txt_AffrimPassword" runat="server" MaxLength="12" onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"></asp:TextBox>
onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"></