打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
【chrome错误】Cross origin requests are only supported for protocol schemes: http, data,chrome

使用ajax请求本地文件,chrome会报跨域错误:XMLHttpRequest cannot loadfile:///C:/Users/Li/Desktop/images/alist.json.Cross origin requests are only supported for protocol schemes: http, data,chrome-extension, https, chrome-extension-resource.

解决方法:

给chrome添加启动参数:--allow-file-access-from-files。

具体方法:

在浏览器快捷方式上右键-属性-快捷方式-目标 如下图:

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
A Parser-blocking, cross-origin script
fatal: protocol ‘–https‘ is not supported
Address family not supported by protocol等很多问题的解决方案
mount-onolock-tnfsfailed:Protocolnotsupported挂载失败
盘点一个Python网络爬虫问题
介绍一个能避免 CORS 错误的 Chrome 扩展 - Moesif Origin & CORS Changer
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服