📅  最后修改于: 2022-03-11 15:02:46.703000             🧑  作者: Mango
//This kill only the request
//If the server handled the request, the .abort() function won't kill it
var xhr = $.ajax({
type: "POST",
url: "some.php",
data: "name=John&location=Boston",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
//kill the request
xhr.abort()