您的位置:首页 > 其它

登录 注册 用户体验

2010-11-07 23:58 316 查看
jquery 代码

$(".inputs").focus(function(){
$(this).addClass("on_input");
});

$(".uemail").focus(function(){
$('.do_tip').empty();
$('.do_tip').removeClass("do_tip error_tip");
if($(this).val() =="")
{
//$(this).parent().parent().next().find("span").show();
$(this).parent().next().find("span").removeClass();
$(this).parent().next().find("span").addClass('help_tip');
if($(this).attr('id')=="login_user")
{
$(this).parent().next().find("span").html("");
}
else
{
$(this).parent().next().find("span").html("请使用有效邮箱");
}
return (false);
}

});

$(".uemail").blur(function(){
CheckEmail($(this));
});

$("#nick").focus(function(){
$(this).select();
if($(this).val() =="")
{   $(this).parent().next().find("span").removeClass('do_tip error_tip ok_tip help_tip');
$(this).parent().next().find("span").addClass('help_tip');
$(this).parent().next().find("span").html("字母,数字下划线或汉字");
return (false);
}
});
$("#nick").blur(function(){
CheckNick($(this));
});

$("#password,#confirm_password,#login_psword").focus(function(){
if($(this).val() =="")
{   $(this).parent().next().find("span").removeClass('do_tip error_tip ok_tip help_tip');
$(this).parent().next().find("span").addClass('help_tip');
if($(this).attr('id')=="login_psword")
{
$(this).parent().next().find("span").html("");
}
else
{
$(this).parent().next().find("span").html("不能少于6位字符");
}

return (false);
}
});
$("#password,#login_psword").focus(function(){
$(this).select();

});
$("#password,#login_psword,#nick").select(function(){
$('.maillist').hide();
});

$("#password,#confirm_password,#login_psword").blur(function(){
CheckPassword($(this));
});

$("#confirm_password").focus(function(){
if($(this).val() =="")
{   $(this).parent().next().find("span").removeClass('do_tip error_tip ok_tip help_tip');
$(this).parent().next().find("span").addClass('help_tip');
$(this).parent().next().find("span").html("请再次输入密码");
return (false);
}
});
$("#confirm_password").blur(function(){
ComparePassword($(this).parent().parent().prev().find("input"),$(this));
});

$("#captcha").focus(function(){
if($(this).val() =="")
{   $(this).parent().next().find("span").removeClass('do_tip error_tip ok_tip help_tip');
$(this).parent().next().find("span").addClass('help_tip');
$(this).parent().next().find("span").html("");
return (false);
}
});

$("#captcha").blur(function(){
CheckYzm($(this));
});

$(".inputs").blur(function(){
$(this).removeClass("on_input");
});

function CheckEmail(Email)
{    //Email.parent().parent().next().find(".do_tip").remove();
Email.parent().next().find("span").removeClass('error_tip ok_tip help_tip').addClass('do_tip');
if(Email.val() =="")
{
//Email.parent().parent().next().find(".do_tip").show();
Email.parent().next().find(".do_tip").addClass('
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: