logo
  • 教程列表
  • SO官方文檔
  • Ajax
    • 使用 .ajax() 處理 HTTP 響應程式碼
    • 使用 Ajax 提交表單
    • 在一個例子中
    • Ajax 檔案上傳
    • Ajax 中止呼叫或請求
    • 傳送 JSON 資料
  1. StackOverflow 文件
  2. jQuery 教程
  3. Ajax
  4. Ajax 中止呼叫或請求

Ajax 中止呼叫或請求

Created: November-22, 2018

var xhr = $.ajax({
    type: "POST",
    url: "some.php",
    data: "name=John&location=Boston",
    success: function(msg){
       alert( "Data Saved: " + msg );
    }
});

//殺死請求

xhr.abort()
  • 傳送 JSON 資料
  • Ajax 檔案上傳

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明