有人可以帮我将此代码转换为 $.post,我替换的任何代码都不起作用。谢谢
$.ajax({
type: "POST",
url: "http://192.168.254.107/webs/main/ajax/validateLogin.php",
data: sendData,
success: function(data) {
$("#info").html(data);
var ReturnMessage = data;
var mes = ReturnMessage.toString().trim();
if (mes != "" && mes != "Invalid Login!") {
localStorage.setItem("message", ReturnMessage);
window.localStorage.setItem("username", username);
window.localStorage.setItem("data", data);
document.location.href = "trackme.html";
} else {
alert(mes);
}
}
});