我正在尝试这样做:
$(window).unload( function () {
$.ajax({
type: "POST",
url: "http://localhost:8888/test.php?",
data: "test",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
alert (c);
});
但是,永远不会显示成功警报,该请求似乎也没有击中服务器。我究竟做错了什么?