ajax上传数组

2019-03-08  本文已影响0人  2B键盘

在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);
            }
        });

上一篇 下一篇

猜你喜欢

热点阅读