VB中如何使用WebBrowser显示网页中指定位置的图片?

2024-12-25 09:03:14
推荐回答(1个)
回答1:

Private Sub Form_Load()
WebBrowser1.Navigate "http://php.weather.sina.com.cn/search.php?city=武汉&dpc=1"
End Sub

Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim test As String
test = WebBrowser1.Document.body.innerhtml
test = Mid(test, InStr(test, ""))
test = Mid(test, 1, InStr(test, "") + 14)
End Sub

test就是截取到的信息,你可以自行处理