我执行ajax后怎么不能$(this).removeClass("disabled");这个$(this).removeClass("disabled");应该加在什么地方$("#page").delegate("#login_frame.login.mail-login.btn","click",function(){if($(this).hasClass("disabled"))return;varemail=$(".mail-logininput[name='email']").val().trim(),password=$(".mail-logininput[name='password']").val().trim(),isEmail=function(){if(email==""){alert("请输入您的邮箱地址");return;}elseif(!checkEmail(email)){alert("请输入正确的邮箱地址");return;}else{returntrue;}},isPassword=function(){if(password==""){alert("请输入密码");return;}else{returntrue;}};if(isEmail()&&isPassword()){$(this).addClass("disabled");$.ajax({type:"POST",url:"/auth/",data:{email:email,password:password},dataType:"json",success:function(data){if(data.err==403){console.log(data.err);alert(data.msg);}elseif(data.err==200){window.location.reload();}$(this).removeClass("disabled");}});}});
添加回答
举报
0/150
提交
取消