var xhr = $.ajax({ type: "POST", url: "test.php", data: "name=test", success: function(msg){ alert( msg ); } }); //取消请求 xhr.abort()