解决 js ajax跨域访问报“No 'Access-Control-Allow-Origin' header is present on the requested resource.”错误

1.打开chrome快捷方式->属性

解决 js ajax跨域访问报“No 'Access-Control-Allow-Origin' header is present on the requested resource.”错误

2.末尾添加: --args -disable-web-security --user-data-dir=      注意--args 前面要有一个空格

解决 js ajax跨域访问报“No 'Access-Control-Allow-Origin' header is present on the requested resource.”错误

3.重新启动浏览器(出现黄色提示就证明可以了)


解决 js ajax跨域访问报“No 'Access-Control-Allow-Origin' header is present on the requested resource.”错误