首页 新闻 会员 周边

formvalidator 问题

0
[已解决问题] 解决于 2012-07-21 11:10

<form id="loginForm" runat="server">
<table style=" width: 1000px;">
<tr>
<td style=" width: 20%; height: 30px;">用户名:</td>
<td style=" width: 70%;">
<asp:TextBox ID="txt_uname" runat="server"></asp:TextBox>
<span id="txt_unameTip"></span>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btn_save" runat="server" Text="保 存" />
</td>
</tr>
</table>
</form>
<script type="text/javascript">
$.formValidator.initConfig({
formid: "loginForm",
onerror:function(msg){
alert(msg)
},
onsuccess:function(){
alert('success');
}
});

$("#txt_uname").formValidator(
{
onshow : "请输入用户名",
onfocus : "用户名至少6个字符,最多10个字符",
oncorrect: "该用户名可以注册"
}
).inputValidator(
{
min : 6,
max : 10,
onerror : "你输入的用户名非法,请确认"
}
).regexValidator(
{
regexp : "username",
datatype : "enum",
onerror : "用户名格式不正确"
}
);
</script>

 

好像没什么作用,什么原因呢

iisp的主页 iisp | 初学一级 | 园豆:81
提问于:2012-04-15 09:50
< >
分享
最佳答案
0

你用的是什么验证插件

奖励园豆:5
artwl | 专家六级 |园豆:16736 | 2012-04-15 09:58

jquery formvalidator 

iisp | 园豆:81 (初学一级) | 2012-04-15 10:06
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册