jquery异步调用天气预报

xiaoxiao2026-05-19  16

网页调用天气预报只需到天气网copy它的天气插件即可,但是它的css是没有编辑的。基于此我用jquery异步调用。代码: <div id="weather"> <script type="text/javascript"> $.ajax({type:"GET", url: "http://m.weather.com.cn/data/101210401.html", dataType:"jsonp", success: function(json){ var result = eval("(" + json.responseText + ")"); $("#weather").append(result.weatherinfo.city+' <img src="http://m.weather.com.cn/img/c'+result.weatherinfo..img1+'.gif"/>'+' <img src="http://m.weather.com.cn/img/c'+result.weatherinfo..img2+'.gif"/> '+result.weatherinfo..weather1+' '+ result.weatherinfo..temp1); } }); </script> 运行时firbg总是出现invalid label异常,请问大家如何解决? 相关资源:jquery封装的天气预报
转载请注明原文地址: https://www.6miu.com/read-5049047.html

最新回复(0)