$.getJSON not working with local JSON file

前端 未结 8 1100
野趣味
野趣味 2021-01-15 08:56

I am desperately trying to get a local build of a site to get a JSON file (also local) with no luck. The exact code worked perfect on my server, but once local, breaks.

8条回答
  •  余生分开走
    2021-01-15 09:22

    I think you use a Webkit browser like chrome, right? Chome does'n see a relation between two local files. Use Firefox or run it on a webserver ;)

    "Origin null is not allowed by Access-Control-Allow-Origin" in Chrome. Why?

提交回复
热议问题