部分天氣預報指令碼

2021-09-30 09:03:07 字數 644 閱讀 7848

合肥

" width=178 height=21 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url>

修改後" width=278 height=21 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url>

如果您會html語言,您還可以在iframe**中的url後面加引數,如:

chengshi_321.html?c0=f9dc68&c1=white&c2=fefce0&t1=red&bg=white&w=178&h=250&text=no

其中 c0 表示 **第一行背景顏色,c1,c2表示**其他行間隔的背景顏色,t1表示 標題顏色,bg 表示頁面北京顏色,w表示**寬度 h 表示**高度

當 text=yes 時,將會出現滾動的天氣文字,建議您自己除錯看看,如:

chengshi_321.html??c0=red&c1=ff9900&bg=f4fff4&w=178&h=20&text=yes

注意:顏色請不要加 # 符號,如 #ff9900 請寫成 ff9900

Flex 天氣預報

效果如下截圖 建立乙個flex專案weather 在weather.mxml中新增乙個httpwebservice如下 result onresult event resultformat e4x 定義乙個onresult函式如下 bindable private var xml xml new x...

python天氣預報

1.引入requests import requests def query now 查詢實時天氣 return none query city input 請輸入要查詢的城市名稱 2.準備url位址 url query city 3.發請求,接收資料 response requests.get u...

天氣預報小偷

首先,進行小偷程式的一些初始化設定,以上 的作用分別是忽略掉所有非致命性錯誤,把小偷程式的執行超時時間設定得很長 這樣不會出現執行超時的錯誤 轉換原來預設的utf 8編碼轉換成gb2312編碼,否則直接用xmlhttp元件呼叫有中文字元的網頁得到的將是亂碼。然後呼叫xmlhttp元件建立乙個物件並進...