ajax请求另一端口session总为空

$.ajax({
                                    url : 'http://localhost:8080/index/yzmyz', //传输地址
                                    type : "post",  //方式
                                    data : {yzm:$("input[name='code']").val()},//传值
                                    async : false, //是否异步
                                    xhrFields: {withCredentials: true},//解决办法代码
                                    success : function(data) { //data为返回值
                                        	if(data)
                                        		jg=false;
                                        	else
                                        		alert("验证码不正确")
                                    }
                                })
发布了48 篇原创文章 · 获赞 1 · 访问量 3803

猜你喜欢

转载自blog.csdn.net/qq_43840143/article/details/103858424