回复 10# black丶shark
你把网页保存成1.html
$file_html=FileRead(@ScriptDir&"\1.html")
Dim $html = ObjCreate("htmlfile")
With $html
.open()
.designmode = "on"
.write($file_html)
dim $div = .getElementsByTagName("div")
EndWith
For $i = 0 To $div.length
If StringInStr($div($i).classname,"days7") Then
ExitLoop
EndIf
Next
$Aday = $div($i).getElementsByTagName("b")
$Atemp = $div($i).getElementsByTagName("span")
$Aweather = $div($i).getElementsByTagName("img")
$str = ""
For $m = 0 To $Aday.length*2-1 Step 2
$n = $m / 2
$str = $str & $Aday($n).innertext &" 温度:"& $Atemp($n).innertext &" 白天:"&StringFormat("%-4s",$Aweather($m).alt)&" 晚上:"&$Aweather($m+1).alt& @CRLF
Next
MsgBox(0,0,$str)
|