modify getJSON to work with CORS
问题 I am looking for ways to allow cross-domain access using $.getJSON. I came across solutions which suggest that using CORS is the solution to this problem. But most of the solutions have a general ajax format. I cannot use JSONP since I get data from a server which I do not have access. Is there a way to modify this code using $.getJSON to get the data? $.getJSON(jsonURL, function(res){ console.log(JSON.stringify(res)); }); Or do I have to use ajax format for CORS? 回答1: Server which I do not