No 'Access-Control-Allow-Origin' header is present on the requested resource.'Ajax跨域访问解决方案
No 'Access-Control-Allow-Origin' header
is
present on
the
requested resource.
当使用ajax访问远程服务器时,请求失败,浏览器报如上错误。这是出于安全的考虑,默认禁止跨域访问导致的。
一、什么是跨域访问
举个栗子:在A网站中,我们希望使用Ajax来获得B网站中的特定内容。如果A网站与
转载
2017-05-26 11:06:47 ·
396 阅读 ·
0 评论