您现在的位置是:首页 > 技术交流技术交流

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

2019-12-11【技术交流】1122 人已围观

简介No 'Access-Control-Allow-Origin' header is present on the requested reso...

No 'Access-Control-Allow-Origin' header is present on the requested resource.  在使用jquery中的ajax异步加载页面时如果被调用的页面和当前页面不在同个域名(或端口号)下,就会报此错误,说白了就是浏览器禁止跨域调用. 这是浏览器为了防止一些对浏览者攻击设置的限制.如何解决呢? 这需要在被调用布面的html头部申明可允许跨域调用 

<meta http-equiv="Access-Control-Allow-Origin" content="*" />




关注宁波网站建设博客,更多精彩分享,敬请期待!
 

Tags:

很赞哦! ()

文章评论

点击排行

本站推荐

站点信息