$.getJSON not working with local JSON file

前端 未结 8 1182
野趣味
野趣味 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:23

    try https://jsonbin.io/ with making the bin as public and provide the url to the getJSON cal

    $.getJSON("https://api.jsonbin.io/b/58f9f835a3de5638", function(data) {}
    

提交回复
热议问题