阅读背景:

如何通过使用AJAX以HTTP请求的方式接收作为参数的对象数组?

来源:互联网 

My ajax call looks like this:

我的ajax调用如下:

  $.ajax({
    url: "/doSomeCoolThingOnServer",
    type: "POST",
    async: false,
    data: {
      simple_string: "Variable sent from client side",
      array_of_strings: ["John", "George"],
      array_of_objects: [
        { city: "Shanghai", population: 1000 },
        { city: "Budapest", population: 2501 }
      ]
    },
    success: function(response) {
      console.log("===== SUCCESS =====");
      console.log(response);
    },
    error: function(response) {
      console.log("===== ERROR =====");
      console.log(response);
    }
  });
 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: