我有这段代码,在 FireFox 中它似乎不起作用
SignIn: function () {
$("#message-box").hide();
var RememberMe = false;
if ($('#RememberMe').is(':checked') == true) {
RememberMe = true;
}
$.ajax({
url: "/Home/AuthenticateUser",
data: { UserEmail: $("#Login-UserEmail").val(), UserPassword: $("#Login-UserPassword").val(), RememberMe: RememberMe },
type: "POST",
success: function (data) {
if (data != "") {
$("#message-box").html(data);
$("#message-box").slideDown();
} else {
// alert("test") this dont fire either even though data ==""
window.location.href = "/Dashboard/";
//tried window.location = "/Dashboard/"; not work either
}
},
error: function (data) {
alert(data);
}
});
},