我正在尝试像这样向 yahoo wheather forcast 提出请求
function parseXml(woeid)
{
$.ajax({
type: "GET",
url: "http://weather.yahooapis.com/forecastrss?w="+woeid,
dataType: "xml",
success: parse_wheather
});
}
我收到以下错误消息
XMLHttpRequest cannot load http://weather.yahooapis.com/forecastrss?w=1937103. Origin http://XXXXXXXX.com is not allowed by Access-Control-Allow-Origin.
我知道我无法从 localhost 发出请求,但我没有运行 localhost 我该如何解决这个问题?