百度了一下,找了点别人的方法改进了一下。
获取天气网址:http://.cn/img/c"+result.weatherinfo.img2+".gif\"/> ";//天气图片2
Getinfo+=result.weatherinfo.weather1+" ";//天气情况
Getinfo+=result.weatherinfo.temp1;//温度
$.cookie(COOKIE_info,Getinfo, { path: '/', expires: date });
$("#weather").html(Getinfo);
}
});
}
html代码:
复制代码 代码如下:
<div id="weather" style="font-size:12px;"></div>
这个是用网络上常见的asp抓取,当然也可以换成.net抓取或者其他。附上demo。
