页面如下:<div class="pr">
<input type="text" class="text w186" name="freeemail" value="<!--{$fmail}-->" id="freeemail" /> <span class="red">@163.com</span>
<label id="checking_user" class="checking">检查中...</label>
</div>JS如下:$(function(){
var i = 0;
$('#freeemail_form').validate({
submitHandler: function(form) {
set_nickname();
var options = {
type: 'post', // 'get' or 'post', override for form's 'method' attribute
dataType: 'json',
beforeSend: showStart,
success: showResponse
};
$(form).ajaxSubmit(options);
},
errorPlacement: function(error, element){
error.appendTo(element.parent("div"));
},
onkeyup: false,
focusCleanup: true,
errorElement : "div",
focusOnFunc:function(element, error) {
//$(error).hide();
$(element).siblings('.error').hide();
$(element).siblings('.validate_right').hide();
$(element).siblings('.note_pop').show();
},
focusOutFunc:function(element, error) {
$(element).siblings('.note_pop').hide();
},
success : function(label){
label.siblings('.note_pop').hide();
label.addClass('validate_right');
},
rules : {
freeemail : {
freemail: true,
remote : {
url :'index.php?ctrl=register&act=is_exist&type=freeemail',
type:'get',
data:{
name : function() {
return $('#freeemail').val()+"@sina.cn";
}
},
beforeSend : function(){
var _checking = $('#checking_user');
_checking.next('label').hide();
_checking.next('div').hide();
$(_checking).show();
},
complete :function(){
$('#checking_user').hide();
i += 1;
}
}
},
},
messages : {
freeemail : {
freemail : "邮箱名只能是字母,数字和下划线构成<span></span>",
remote : "该邮箱地址已被注册,是否立即<a href='#' onclick='popup();'>登录</a>?<span></span>",
often : "您的注册过于频繁,请1小时后重试。"
}
}
});
});当用户注册的次数超过10次时,显示often的提示信息。哪位大侠用过该插件请指教!!!
<input type="text" class="text w186" name="freeemail" value="<!--{$fmail}-->" id="freeemail" /> <span class="red">@163.com</span>
<label id="checking_user" class="checking">检查中...</label>
</div>JS如下:$(function(){
var i = 0;
$('#freeemail_form').validate({
submitHandler: function(form) {
set_nickname();
var options = {
type: 'post', // 'get' or 'post', override for form's 'method' attribute
dataType: 'json',
beforeSend: showStart,
success: showResponse
};
$(form).ajaxSubmit(options);
},
errorPlacement: function(error, element){
error.appendTo(element.parent("div"));
},
onkeyup: false,
focusCleanup: true,
errorElement : "div",
focusOnFunc:function(element, error) {
//$(error).hide();
$(element).siblings('.error').hide();
$(element).siblings('.validate_right').hide();
$(element).siblings('.note_pop').show();
},
focusOutFunc:function(element, error) {
$(element).siblings('.note_pop').hide();
},
success : function(label){
label.siblings('.note_pop').hide();
label.addClass('validate_right');
},
rules : {
freeemail : {
freemail: true,
remote : {
url :'index.php?ctrl=register&act=is_exist&type=freeemail',
type:'get',
data:{
name : function() {
return $('#freeemail').val()+"@sina.cn";
}
},
beforeSend : function(){
var _checking = $('#checking_user');
_checking.next('label').hide();
_checking.next('div').hide();
$(_checking).show();
},
complete :function(){
$('#checking_user').hide();
i += 1;
}
}
},
},
messages : {
freeemail : {
freemail : "邮箱名只能是字母,数字和下划线构成<span></span>",
remote : "该邮箱地址已被注册,是否立即<a href='#' onclick='popup();'>登录</a>?<span></span>",
often : "您的注册过于频繁,请1小时后重试。"
}
}
});
});当用户注册的次数超过10次时,显示often的提示信息。哪位大侠用过该插件请指教!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货