上面的代码问题我知道错在哪了,现在是以下这个关键问题:
Private Sub Command1_Click()
WebBrowser6.Navigate "
Private Sub Command2_Click()
Dim tg5
Dim d5
Dim doc5 As String
Dim doctext
Dim i As Long
Set doctext = WebBrowser1.Document.body.createTextRange()
Set d5 = WebBrowser1.Document
doc5 = doctext.htmltext
For i = 0 To d5.All.length - 1
Set tg5 = d5.All(i)
If LCase(d5.All(i).tagName) = "input" Or LCase(d5.All(i).tagName) = "select" Then
If InStr(1, doc5, "开始") > 0 Then
If tg5.Type = "submit" Then
tg5.Click
End If
End If
If InStr(1, doc5, "signup/page1") > 0 Then
If tg5.Type = "radio" Then
Select Case tg5.Name
Case "q1"
tg5.Value = "7"
Case "q2"
tg5.Value = "2"
End Select
ElseIf tg5.Type = "submit" Then
tg5.Click
End If
End If
End If
Next i
End Sub
点击了第1页 的注册按钮后,第二页的填表和按钮就完全不执行了,我觉得If InStr(1, doc5, "开始") > 0 Then 和If InStr(1, doc5, "signup/page1") > 0 Then在这里没有起作用,请问如何修改?