天天看点

No ‘Access-Control-Allow-Origin‘ header is present on the requested resource

遇到问题

No ‘Access-Control-Allow-Origin‘ header is present on the requested resource

 翻译错误

被CORS政策阻止了:

请求的资源上没有'Access-Control-Allow-Origin'头

CORS是一个W3C标准,全称是"跨域资源共享"(Cross-origin resource sharing)。

它允许浏览器向跨源服务器,发出

XMLHttpRequest

请求,从而克服了AJAX只能同源使用的限制。

需从后台服务器解决跨域问题

继续阅读