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

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

解决Chrome下file跨域问题:

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

然后重启访问就可以了

原文地址:https://www.cnblogs.com/hujiapeng/p/6553568.html