VB webbrowser下载文件

来源:百度知道 编辑:UC知道 时间:2024/05/15 19:05:21
webbrowser下载文件时如何获得下载的地址?
也不是这个.其实我是想做个自带下载器的浏览器.也就是说当我用这个浏览器下载东西时获取下载地址,用自制的浏览器下载,而不用IE自带的那个下载.

Sub gourl(canshu1)

For i = 1 To WebBrowser1.Document.All.length - 1
'If InStr(WebBrowser1.Document.All(i).innertext, "查询我的房源") Then
'WebBrowser1.Document.All(i).Click

If UCase(WebBrowser1.Document.All(i).tagName) = "A" Then

If WebBrowser1.Document.All(i).HREF = canshu1 Then
WebBrowser1.Document.All(i).Click
Exit Sub

End If

End If
Next i
End Sub
看见注释掉的部分了吧,应该是你要的。。
自己改吧