withCredentials 属性 在使用Ajax技术发送跨域请求时,默认情况下不会在请求中携带cookie信息 withCredentials: 指定在涉及跨域请求时,是否携带cookie信息,默认false xhr.withCredentials = true 服务端还要设置 Access-Control-Allow-Credentials:true 允许客户端发送请求时携带cookie