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

来源:5-12 带cookie的跨域1

慕仙7458717

2020-11-06 01:50

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;

                    }

                });



写回答 关注

1回答

  • 慕仙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

ajax跨域完全讲解

完全讲解Ajax跨域产生的原因和解决思路,掌握跨域的各种解决方案

62554 学习 · 90 问题

查看课程

相似问题