比较实用的几个天气预报调用代码
1、265天气根据IP自动获得当地的天气情况
代码:<iframe src="http://weather.265.com/weather.htm" width="168" height="54" frameborder="no" border="0" marginwidth="0&quoat; marginheight="0" scrolling="no">iframe>
效果:
说明 :直接调用就可以了,很方便。
2、新浪天气预报代码
代码 :>
效果 :
说明 :这种适合于在网页的头栏插入。上面的城市可以自定,比如 石家庄可改成别的。
3、QQ天气预报代码
代码 :<iframe src="http://appnews.qq.com/cgi-bin/news_qq_search?city=北京" frameborder="0" width="160" scrolling="no" height="230">iframe>
效果 :
说明 :这种适合于在网页的边栏插入。上面的城市可以自定,比如南昌可改成别的。定制的方法是修改我代码中标红的名称。这里比较简单,直接用汉字改就行了。比如是福州的,你就直接把“厦门”改成福州就行
<iframe src="http://www.7stk.com/1/6/weather2.htm" width="189" height="190" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no">iframe>
<iframe src="http://www.7stk.com/1/6/sina.htm" frameborder="0" width="117" height="37" marginheight="0" marginwidth="0" scrolling="no">iframe>
<iframe src="http://www.7stk.com/1/6/qq.htm" frameborder="0" width="160" height="15" marginheight="0" marginwidth="0" scrolling="no">iframe>
<iframe src="http://www.7stk.com/1/6/sina02.htm" width="129" height="89" frameborder="0" marginwidth="1" marginheight="1" scrolling="no" name="I9" align="middle">
iframe>
<iframe src="http://weather.people.com.cn/customize/onpeople4.html" width="334" height="23" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" name="I2" align="middle">
¥29.8
¥9.9
¥59.8