VB 获取网页内全部连接
来源:百度知道 编辑:UC知道 时间:2024/05/21 08:09:51
如题
Option Explicit
Private Sub Command1_Click()
Command1.Enabled = False
WebBrowser1.Navigate2 Text1.Text
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim x As Long
List1.Clear
For x = 0 To WebBrowser1.Document.Links.length - 1
List1.AddItem WebBrowser1.Document.Links.Item(x)
Next x
Command1.Enabled = True
End Sub
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
Label3 = Text
End Sub
QQ 401041