vb WebBrowser网页判断后提取
2个回答
展开全部
提取所有链接倒可以,但手机号码和邮件地址要以网页而定。
提取所有链接代码:
点击按钮后,所有网址都保存在d:\1.txt里
Private Sub Command1_Click()
Open "d:\1.txt" For Output As #1
Close
Dim x As Long
Dim y As String
For x = 0 To WebBrowser1.Document.links.length - 1
Print WebBrowser1.Document.links.Item(x)
y = WebBrowser1.Document.links.Item(x)
Open "d:\1.txt" For Append As #1
Write #1, y
Close (1)
Next x
End Sub
提取所有链接代码:
点击按钮后,所有网址都保存在d:\1.txt里
Private Sub Command1_Click()
Open "d:\1.txt" For Output As #1
Close
Dim x As Long
Dim y As String
For x = 0 To WebBrowser1.Document.links.length - 1
Print WebBrowser1.Document.links.Item(x)
y = WebBrowser1.Document.links.Item(x)
Open "d:\1.txt" For Append As #1
Write #1, y
Close (1)
Next x
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询