ajax传数组字符串有冒号,解决ie的请求的缓存问题

      ajax传数组字符串有冒号:一定要加上 contentType: "application/json";

      解决ie的缓存问题cache: false,

      将数组转换成字符串: JSON.stringify(arr)

 $.ajax({

            dataType: "json",
            type: "post",
            cache: false,
            contentType: "application/json",
            data: JSON.stringify(newArr),
            url: "",
            success:function(res){ //请求成功后处理函数。
            }, error: function (jqXHR, textStatus, errorThrown) {
            }

猜你喜欢

转载自blog.csdn.net/luckysyy/article/details/80856294