顯示結果從 1 到 1 共計 1 條
-
08-08-2011 #1
各位大大 說真的眼花了 還是沒辦法找到哪可以修改天氣和地區的
就請各位幫一下忙了 我列了這一段能否幫我舉出要修改哪裡的
也看過好幾篇天氣的問題 始終沒法有個解答 就忙凡各為了 謝謝阿
function fetchWeatherData (callback, zip)
{
url="http://weather.yahooapis.com/forecastrss?u=f&p=" //u=Farenheit, because accuWeather sucks
var xml_request = new XMLHttpRequest();
xml_request.onload = function(e) {xml_loaded(e, xml_request, callback);}
xml_request.overrideMimeType("text/xml");
xml_request.open("GET", url+zip);
xml_request.setRequestHeader("Cache-Control", "no-cache");
xml_request.send(null);
return xml_request;
}
function xml_loaded (event, request, callback)
{
if (request.responseXML)
{
var obj = {error:false, errorString:null};
var effectiveRoot = findChild(findChild(request.responseXML, "rss"), "channel");
obj.city = findChild(effectiveRoot, "yweather:location").getAttribute("city");
obj.realFeel = findChild(effectiveRoot, "yweather:wind").getAttribute("chill");//Only accounts for windChill
conditionTag = findChild(findChild(effectiveRoot, "item"), "yweather:condition");
obj.temp = conditionTag.getAttribute("temp");
obj.icon = conditionTag.getAttribute("code");
obj.description = conditionTag.getAttribute("text");
callback (obj);
}else{
callback ({error:true, errorString:"XML request failed. no respon
相似的主題
-
[詢問] reviDX地區
由a741s852d963論壇中佈景主題專區回覆: 11最後發表: 08-09-2011, 00:30 -
[詢問] Lock Weather 地區中文
由pqrh2o798論壇中佈景主題專區回覆: 0最後發表: 03-21-2011, 01:43 -
[詢問] HTC Widget[hd]改地區
由shuan0825論壇中佈景主題專區回覆: 1最後發表: 02-23-2011, 01:13 -
[已解決] 關於修改地區天氣 拜託各位大大幫幫忙
由zake0502論壇中佈景主題專區回覆: 6最後發表: 01-03-2011, 14:46 -
[詢問] 這個主題的天氣地區修改有點不同 請問有人能幫我看看嗎? 謝謝
由zake0502論壇中佈景主題專區回覆: 1最後發表: 12-17-2010, 10:49