问题描述:

  通过Ajax获取本地JSON文件时候,报Received an invalid response. Origin 'null' is therefore not allowed access. 错误。

原因:

  Chrome浏览器不支持本地Ajax请求,当在html文件中使用Ajax时候,就报错。

解决方案:

  右击chrome浏览器快捷方式图标,选择属性,在目标中添加:--allow-file-access-from-files,与chrome.exe之前有个空格。

                                 

 

posted on 2015-07-08 16:57  如果你知道  阅读(506)  评论(0)    收藏  举报