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

  • 关于我们
  • 免责声明