ljl-blog
        var userArr = new Array();

        var user = {};
        user.name = "张三";
        user.age = 24;
        userArr.push(user);

        user.name = "李四";
        user.age = 26;
        userArr.push(user);

        $.ajax({
            url: "/mysql/lian/txlian",
            type: "POST",
            async: false,
            contentType : \'application/json;charset=utf-8\', //设置请求头信息
//            dataType:"json",
            data: JSON.stringify(userArr),    //将Json对象序列化成Json字符串,JSON.stringify()原生态方法
//            data: $.toJSON(customerArray),            //将Json对象序列化成Json字符串,toJSON()需要引用jquery.json.min.js
            success: function(data){
                window.location.href="/mysql/lian/qrxxl";
            },
            error: function(res){
                alert(res.responseText);
            }
        });        

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-02-12
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-06
  • 2021-12-26
  • 2022-01-14
  • 2021-08-13
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案