ziye
$.ajax({
type: "POST",
url: "Login/LoginAction",
data: { txtName: $("#txtName").val(), txtPwd: $("#txtPwd").val(), txtCode: $("#txtCode").val() },
success: function (data) {
if (!data.success) {
$("#errorMsg").removeClass("hid").addClass("err");
$("#errorMsg").text(data.msg);
else {
window.location.href = "/Index.html";
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) { // 通常情况下textStatus和errorThown只有其中一个有值
alert(XMLHttpRequest.status);
alert(XMLHttpRequest.readyState);
alert(textStatus);
}
});

分类:

技术点:

相关文章:

  • 2021-09-27
  • 2022-01-05
  • 2022-01-05
  • 2021-09-07
  • 2022-01-05
  • 2022-01-05
  • 2022-01-05
  • 2022-12-23
猜你喜欢
  • 2021-05-18
  • 2022-12-23
  • 2021-09-30
  • 2021-08-06
  • 2022-01-05
  • 2022-12-23
  • 2021-11-05
相关资源
相似解决方案