Dim vDoc, vTag As Object
Dim i As Short
vDoc = WebBrowser1.Document.DomDocument
For i = 0 To vDoc.All.length - 1 '檢測所有標籤
If UCase(vDoc.All(i).tagName) = "INPUT" Then '找到input標籤
vTag = vDoc.All(i)
If vTag.Type = "text" Then '判斷text欄位
Select Case vTag.Name
Case "idNumber" '檢查帳號欄位
vTag.Value = Text2.Text '要填入的資料
End Select
End If
If vTag.Type = "text" Then '判斷text欄位
Select Case vTag.Name
Case "birthDate" '檢查密碼欄位
vTag.Value = Text3.Text '要填入的資料
End Select
End If
If vTag.Type = "button" And vTag.Value = "確 定" Then
vTag.Click()
End If
If vTag.Type = "button" And vTag.Value = "重新查詢" Then
vTag.Click()
End If
End If
Next i
If vTag.Type = "button" And vTag.Value = "確 定" Then
vTag.Click()
End If
If vTag.Type = "button" And vTag.Value = "重新查詢" Then
vTag.Click()
End If
End If
Next i
沒有留言:
張貼留言