问题:打开本地html文件时,,报错如下
Cross origin requests are only supported for protocol schemes: http, data,chrome-extension, https, chrome-extension-resource.
分析:浏览器为了安全性考虑,默认对跨域访问禁止。
解决:给浏览器传入启动参数(allow-file-access-from-files),允许跨域访问。
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" –allow-file-access-from-files
参考资料:
爱情要完结的时候自会完结,到时候,你不想画上句号也不行。