我正在尝试通过 ajax 获取登录状态,但是 ajax 查询没有正确发生。
function getdetails(playlistname) {
alert(playlistname);
$.ajax({
type: "POST",
url: "model/login_details1.php",
beforeSend: function (xhr) {
alert("before send");
},
error: function (xhr, ajaxOptions, thrownError) {
alert("ajax error - arun");
alert(xhr.status);
alert(thrownError);
},
data: {
fname: name,
playlistname: playlistname
}
}).done(function (result) {
if (!sessionStorage['pid']) {
sessionStorage['pid'] = result;
} // window.location = "Playlist.html";
});
}
我在发布前收到警报,但发布后的警报(错误)消失了。