本地Chrome测试JS代码报错:XMLHttpRequest cannot load

这种file跨域问题在火狐下是不存在的

解决Chrome下file跨域问题:

在Chrome应用程序下,右键属性,目标处添加"--allow-file-access-from-files" 注意空格分割

然后重启访问就可以了

 

posted @ 2017-03-15 12:26  jiapeng  阅读(1176)  评论(0编辑  收藏  举报