$(document).ajaxComplete(function (event, xhr, option) {
if (xhr.responseText == "okLogin") { //服务器端已经返回了oklogin,到这里为什么就不执行了,是我的代码问题么?
//alert('oklogin');
window.location('/MT/system/MTIANCENTRE');
} else if (xhr.responseText == "errcode") {
//alert('errcode');
$("#cos").empty().html("验证码错误!");
} else if (xhr.responseText == "errother") {
//alert('errother');
$("#idone").css("display", "block");
$("#code").css("display", "none");
$("#usernames").empty().html("用户名可能错误");
$("#passwords").empty().html("登录密码可能错误");
$("#password").empty();
}
});
jquery,ajax问题,谢谢解答
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
4条回答 默认 最新
斯洛文尼亚旅游 2017-07-20 01:31关注location不是函数,是属性
window.location='/MT/system/MTIANCENTRE';本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报