JQuery code to cancel an Ajax request

From , 5 Years ago, written in JavaScript, viewed 194 times.
URL https://pastebin.vip/view/4a3fd911
  1. var xhr = $.ajax({
  2.     type: "POST",
  3.     url: "test.php",
  4.     data: "name=test",
  5.     success: function(msg){
  6.        alert( msg );
  7.     }
  8. });
  9.  
  10. //取消请求
  11. xhr.abort()

Reply to "JQuery code to cancel an Ajax request"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website