如果用原生的AJAX是加载本地文件就不会出现错误.当然,这个jquery的load放在服务器上通过http加载还是支持的.也有例外比如在firefox和ie浏览器使用$.ajax加载本地html或txt文件时,不会报错. 当其他浏览器控制台弹出下面报错,表明这个不支持跨域浏览本地文件: Access to XMLHttpRequest at 'file:///F:/%E4%BB%A3%E7%A0%81/Jquery/a.txt' from origin 'null' has been block
1.前端页面使用vue中的axios请求nodejs响应.报以下错误: Failed to load http://localhost:3000/users/validate: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://loc