Ajax调用

var params = { "username": username, "userpwd": userpwd};
$.ajax({
url: "../Ashx/LoginSubmit.ashx?method=CheckLogin",
data: params,
type: "post",
success: function (data) {
if (data != null && data == "success") {
location.href = "index.aspx";
return true;
}
else if (data != null && data == "err") {
location.href = "../View/404.html";
return false;
}
}
});

posted @ 2020-06-15 15:53  一城烟雨一壶酒  阅读(127)  评论(0)    收藏  举报