WEB 访问跨域问题

解决方案:

在ajax请求处添加 dataType:"JSONP"

在servlet处写 response.addHeader("Access-Control-Allow-Origin","*");

 

你可能感兴趣的:(开发,前端)