美文网首页
ajax上传数组

ajax上传数组

作者: 2B键盘 | 来源:发表于2019-03-08 14:25 被阅读0次

在ajax属性中加上traditional并设置为true即可


      
        var TOOLS = [1,2];
        $.ajax({
            url:getHostUrl() + "/application/findListByCategoryId.html",
            type:"GET",
            data:{"categoryId":TOOLS},
            async:true,
            traditional:true,
            success:function(res){
                console.log(res);
            }
        });

相关文章

网友评论

      本文标题:ajax上传数组

      本文链接:https://www.haomeiwen.com/subject/rterpqtx.html