问答详情
源自:1-2 使用getJSON()方法异步加载JSON格式数据

为什么加载失败

Failed to load https://www.imooc.com/data/sport.json: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access

提问者:qq_小姐姐_13 2018-06-07 14:26

个回答

  • qq_穷困潦倒的馒头_0
    2018-07-14 13:56:30

    可以参考下这篇文章:

    https://blog.csdn.net/memoriesaier/article/details/81040433

  • 一朵大白天
    2018-06-15 15:39:15

    你这是弄到本地了么? 跨域了呀 哈哈哈?link