日期:2014-05-17 浏览次数:20514 次
<asp:TextBox ID="TxtName" runat="server" Width="200px" MaxLength="15">
<asp:RequiredFieldValidator ID="RFV" runat="server" ControlToValidate="TxtName" ErrorMessage="不能为空"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="REV" runat="server" ErrorMessage="格式不符合" ControlToValidate="TxtName" ValidationExpression="[a-zA-Z0-9]{15,}" Display="Dynamic"></asp:RegularExpressionValidator>
<input onkeyup="value=value.replace(/[^\w\.\/]/ig,'')">