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;
}
}
});
原文:https://www.cnblogs.com/ju0221/p/13131381.html