Private Sub Command1_Click()
WebBrowser1.navigate "http://www.a.com/index.htm"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If WebBrowser1.LocationURL = "" Then
Exit Sub
End If
WebBrowser2.navigate "http://www.a.com?randomflag=" & Time()
End Sub
Private Sub WebBrowser2_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If WebBrowser2.LocationURL = "" Then
Exit Sub
End If
Dim WebText As String
WebText = pDisp.document.body.innerText
WebText = Trim(WebText)
Debug.Print WebText
Dim vDoc, vTag
Dim i As Integer
Set vDoc = WebBrowser1.document
For i = 0 To vDoc.All.length - 1 '检测所有标签
If UCase(vDoc.All(i).tagName) = "INPUT" Then '找到input标签
WebBrowser1.navigate "http://www.a.com/index.htm"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If WebBrowser1.LocationURL = "" Then
Exit Sub
End If
WebBrowser2.navigate "http://www.a.com?randomflag=" & Time()
End Sub
Private Sub WebBrowser2_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If WebBrowser2.LocationURL = "" Then
Exit Sub
End If
Dim WebText As String
WebText = pDisp.document.body.innerText
WebText = Trim(WebText)
Debug.Print WebText
Dim vDoc, vTag
Dim i As Integer
Set vDoc = WebBrowser1.document
For i = 0 To vDoc.All.length - 1 '检测所有标签
If UCase(vDoc.All(i).tagName) = "INPUT" Then '找到input标签