Using the Yahoo Weather API with JSON and the script tag
问题 I'm trying to get the Yahoo Weather with JavaScript. I originally made a proxy, but found that clumsy. So can get the JSON response from http://weather.yahooapis.com/forecastjson?w=9807, and I know that the script tag can avoid the same-domain restrictions, but I'm getting a syntax error. Yahoo's JSON response isn't padded; I've got the callback working but the browser isn't interpreting the JSON properly. I've seen many examples like How to read yahoo weather JSON data with Jquery ajax but