BLOG天氣預報代碼

來源:互聯網
上載者:User

原文地址:http://www.kenwong.cn/post/243.html

今天才發現前天加進去的天氣預報,那個烏雲和彩虹的標誌,竟然不是當天的天氣情況,而只是那個網站的標誌(偶真笨死了!)。一怒之下,把它扔了。放狗逛了好久,終於在瘋人物語的BLOG上找到幾段超酷實用的天氣預報代碼,整理分享如下:

<以下代碼經證實有效>

第一種:

<iframe src="http://weather.265.com/weather.htm" width="160" height="54" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
[ 可以先修改再運行 ]

:

第二種:

<IFRAME ID='ifm2' WIDTH='189' HEIGHT='190' ALIGN='CENTER' MARGINWIDTH='0' MARGINHEIGHT='0' HSPACE='0' VSPACE='0' FRAMEBORDER='0' SCROLLING='NO' SRC='http://weather.qq.com/inc/ss258.htm'></IFRAME>
[ 可以先修改再運行 ]

:

第三種:

<IFRAME ID='ifm2' WIDTH='260' HEIGHT='70' ALIGN='CENTER' MARGINWIDTH='0' MARGINHEIGHT='0' HSPACE='0' VSPACE='0' FRAMEBORDER='0' SCROLLING='NO' src="http://news.sina.com.cn/iframe/weather/130101.html"></ifreame>
[ 可以先修改再運行 ]

:

第四種:

<iframe width="469" height="218" border="0" align="center" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="http://appnews.qq.com/cgi-bin/news_weather_search?city=廈門" _fcksavedurl=""http://appnews.qq.com/cgi-bin/news_weather_search?city=廈門"" _fcksavedurl=""http://appnews.qq.com/cgi-bin/news_weather_search?city=廈門"" _fcksavedurl=""http://appnews.qq.com/cgi-bin/news_weather_search?city=廈門"" _fcksavedurl=""http://appnews.qq.com/cgi-bin/news_weather_search?city=廈門"" _fcksavedurl=""http://appnews.qq.com/cgi-bin/news_weather_search?city=廈門"" _fcksavedurl=""http://appnews.qq.com/cgi-bin/news_weather_search?city=廈門"" _fcksavedurl=""http://appnews.qq.com/cgi-bin/news_weather_search?city=廈門"" allowTransparency="true"></iframe>
[ 可以先修改再運行 ]

:

第五種:

<IFRAME ID='ifm1' WIDTH='405' HEIGHT='332' ALIGN='center' MARGINWIDTH='0' MARGINHEIGHT='0' HSPACE='0' VSPACE='0' FRAMEBORDER='0' SCROLLING='NO' SRC="http://weather.qq.com/24.htm"></IFRAME>
[ 可以先修改再運行 ]

:

第六種:

<iframe width="145" height="130" border="0" align="center" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="http://minisite.qq.com/Weather/news_new.html" _fcksavedurl=""http://minisite.qq.com/Weather/news_new.html"" _fcksavedurl=""http://minisite.qq.com/Weather/news_new.html"" _fcksavedurl=""http://minisite.qq.com/Weather/news_new.html"" _fcksavedurl=""http://minisite.qq.com/Weather/news_new.html"" _fcksavedurl=""http://minisite.qq.com/Weather/news_new.html"" _fcksavedurl=""http://minisite.qq.com/Weather/news_new.html"" _fcksavedurl=""http://minisite.qq.com/Weather/news_new.html"" allowTransparency="true"></iframe>
[ 可以先修改再運行 ]

:

大家可根據自己的愛好,把代碼插入要顯示的位置即可。本站採用第一種,因為背景色和本站當前介面比較協調,而且簡明。另外需要注意一下,以前很流行的一段代碼(在Google上搜到的90%都是這一段),現在已經不能用了,特此寫出來,以免大家浪費精力:

<iframe width="150" height="240" frameborder="0" scrolling="No" src='http://appnews.qq.com/cgi-bin/news_qq_search?city=xxx'></iframe>

其中的“xxx”是每個城市的代碼:比如武漢的就是%CE%E4%BA%BA
下面是其他的一些城市的編碼: 

   上海-%C9%CF%BA%A3 
   北京-%B1%B1%BE%A9 
   青島-%C7%E0%B5%BA 
   濟南-%BC%C3%C4%CF 
   武漢-%CE%E4%BA%BA
   福州-%B8%A3%D6%DD

另外,推薦大家到瘋人物語的BLOG裡看看,他的BLOG做得很不錯,尤其是美工方面。採用的是PJBLOG2架構,功能很強大。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.