$.ajax({
type: "POST",
url: "Login.aspx/LoginUser",
data: "{'LoginObject':" + JSON.stringify(LoginObject) + "}",
contentType: "application/json",
dataType: "json",
success: function (data) {
if (data.d == "Success") {
location.href = "Share.aspx";
}
else if(data.d == "Failure")
{
$("#lblStatus").html("Username or Password supplied is invalid. Please try again.");
}
},
});
当 data.d 为失败时,条件语句执行,但当 data.d 为成功时,页面不会跳转到 Share.aspx。代码中的问题是什么?