网页嵌入调用 全国各城市天气代码

现在各大论坛或者博客中都会有天气预报,在做项目的时候,很多时候我们都会使用解析XML文件的方法获得全国各个城市的天气情况,然后插入网页。这样很麻烦,因为我们还必须自己判断用户的IP,获取用户所在的城市,然后查找改城市的代号,然后获取XML文件进行解析。今天在网上看了一下找到了很好用的天气插件,只需要把下面的代码加入你的网页就可以显示天气预报,插件会自动判断用户的所在地,返回正确的天气情况,下面就给大家分享一下,以后写项目,如果没有特殊的天气要求,使用下面的插件很方便的。

插件1:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn1/weather.htm " width="235" height="20" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件2:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn2/weather.htm " width="180" height="20" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件3:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn3/weather.htm " width="225" height="20" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件4:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn4/weather.htm " width="160" height="20" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件5:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn5/weather.htm " width="200" height="20" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件6:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn6/weather.htm " width="140" height="20" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件7:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn7/weather.htm " width="195" height="20" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件8:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn8/weather.htm " width="255" height="20" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件9:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn9/weather.htm " width="210" height="20" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件10:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn10/weather.htm " width="260" height="100" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件11:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn11/weather.htm " width="490" height="50" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件12:

网页代码:

<iframe src="http://m.weather.com.cn/m/pn12/weather.htm " width="245" height="110" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件13 flash:

网页代码:

<iframe src="http://flash.weather.com.cn/wmaps/index.swf?url1=http%3A%2F%2Fwww%2Eweather%2Ecom%2Ecn%2Fweather%2F&url2=%2Eshtml&from=cn"   width="625" height="457" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件14 flash:

网页代码:

<iframe src="http://www.weather.com.cn/html/module/image_1.shtml" width="625" height="457" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件15 flash:

网页代码:

<iframe src="http://www.weather.com.cn/html/module/radar.shtml" width="625" height="457" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件16 flash:

网页代码:

<iframe src="http://www.weather.com.cn/html/module/satellite.shtml" width="625" height="457" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

(这个插件测试没成功,一直打不开,可能是暂时有问题)

插件17:

网页代码:

<iframe src="http://61.4.185.73/static/modules/life/trip_plugin_2.shtml" width="625" height="457" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe 

效果:

插件18:

网页代码:

<iframe src="http://61.4.185.73/static/modules/life/life_plugin_2.shtml" width="625" height="457" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件19:

网页代码:

<iframe src="http://61.4.185.73/static/modules/life/life_plugin_3.shtml" width="625" height="457" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

插件20:

网页代码:

<iframe src="http://61.4.185.73/static/modules/life/trip_plugin_1.shtml" width="625" height="457" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe 

效果:

插件21:

网页代码:

<iframe src="http://61.4.185.73/static/modules/life/trip_plugin_2.shtml" width="625" height="457" marginwidth="0"   marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> 

效果:

原文地址:http://blog.csdn.net/hongkiton/article/details/7396521

原文地址:https://www.cnblogs.com/lanmoxiaozhu/p/3544834.html