先看源码
// return RedirectToAction("Index", "Admin");
return Json(user.UserId, JsonRequestBehavior.AllowGet);
}
return Json(new {success=true,data="密码错误"}, JsonRequestBehavior.AllowGet);
}
return Json("用户名不存在", JsonRequestBehavior.AllowGet);
$.ajax(function(){
var opt= {
url:"/User/Logon",
type: "post",
dataType:"json",
success:proJson,
error:function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); }
};
$('#Form1').submit(function () {
$("#loading img,.errorinfo").show();
$(this).ajaxSubmit(opt);
return false;
});
function proJson(data) {
if (data != "密码错误" && data != "用户名不存在") {
window.open("/Admin/Index/", '_self');
} else {
$.infoShow(data, 0);
}
$("#loading img").hide();
}
});
谷歌显示
IE
不进success,求指点,多谢。