问答详情
源自:5-12 带cookie的跨域1

请问为啥同样的代码,左侧请求不带cookie?

http://img1.mukewang.com/5fa43b310001cb2212760973.jpg

   btn3.onclick=()=>$.ajax({

                    type : "get",

                    url: "http://server.com/getCookie",

                    xhrFields:{

                        withCredentials:true

                    },

                    crossDomain: true,

                    success: function(json){

                        result = json;

                    }

                });



提问者:慕仙7458717 2020-11-06 01:50

个回答

  • 慕仙7458717
    2020-11-06 22:34:20

    https://blog.csdn.net/qq_38527695/article/details/104899751?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param