.attr('type','password')
}else{
that.addClass('on')
that.parents(".iptBox").find('.ipt').attr('type','text')
}
}
//记住密码
function rememberPassword(that){
if(that.find('.checkBox').hasClass('on')){
that.find('.checkBox').removeClass('on')
}else{
that.find('.checkBox').addClass('on')
}
}
//输入框输入移除错误样式
$('.loginMod .ipt').on('blur',function(){
if($(this).val()!=''){
if($(this).parent().hasClass('errorBox')){
$(this).parent().removeClass('errorBox');
$(this).next().text('');
if($(this).hasClass('password_ipt')){
$(this).parents('.loginMod').find('.infoBox').removeClass('errTop')
}
}
}else{
$(this).parent().addClass('errorBox');
if($(this).hasClass('password_ipt')){
$(this).next().text('密码不能为空!');
$(this).parents('.loginMod').find('.infoBox').addClass('errTop')
}else{
$(this).next().text('用户名或手机号不能为空!');
}
}
})
$(document).keydown(function (event) {
if (event.keyCode === 13) {
$(".BtnLogin").click();
}
})