chrome 本地ajax json数据报错 Cross origin requests are only......

报错信息

Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.

解决办法

Chrome.exe右键,快捷方式,目标,添加 –allow-file-access-from-files(注意前面有一个空格)
chrome 本地ajax json数据报错 Cross origin requests are only......

原因

Chrome浏览器使用了数据安全方式,对本地的ajax数据进行了拦截,所以会报错。