邮 箱:
   
密 码:
注册

Chrome异步跨域请求浏览器提示:Cross origin requests are only supported for...

小麻雀 分类: 电脑/IT- 软件- 浏览器 被浏览 21747 次 很久之前

举报


Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.如图片示,怎么办?
 
我有更好的答案∨
 图片
验证码 (看不清,点图换一张)
出错啦!!!
花花世界
采纳
推荐
花花世界
采纳率:82% 10级 举报 很久之前
提示这个原因是:浏览器为了安全性考虑,默认对跨域访问禁止。
解决方法:给浏览器传入启动参数(allow-file-access-from-files),允许跨域访问。Windows下,运行(CMD+R)或建立快捷方式:
"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" --allow-file-access-from-files



更多解决办法参考stackoverflow:
https://stackoverflow.com/questions/10752055/cross-origin-requests-are-only-supported-for-http-error-when-loading-a-local/23758738#23758738
评论41
 

全部回答(1)

分享: 
雪炭问答

举报内容:

举报类型

举报原因


举报说明

详细的描述及证据可以帮助管理员更快速处理违规内容