ajax 数据请求成功后 还是报错? 有什么常见的原因吗?
错误
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
ajax 数据请求成功后 还是报错? 有什么常见的原因吗?
错误
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
这是浏览器的跨域问题,需要服务器端设置请求头response.setHeader("Access-Control-Allow-Origin","*"