我的VB6不知道怎么WebBrowser不能用,我用.NET写了下测试没问题,你自己改成VB6代码吧
Dim Html As Windows.Forms.HtmlDocument
Dim Tag As Windows.Forms.HtmlElement
Dim I As Integer
Html = WebBrowser1.Document
For I = 0 To Html.All.Count - 1
Tag = Html.All(I)
If Tag.TagName = "INPUT" Then
Try
If Tag.GetAttribute("maxlength") = "12" Then
Tag.SetAttribute("value", "aaaaaaaaaa")
End If
Catch ex As Exception
End Try
End If
Next
------------------------------
还是我给改下吧,因为我这VB6不能用,所以上边的.NET代码肯定可以用,下边的是我写的,没测试你试试!
Dim Html ,Tag
Dim I As Integer
Html = WebBrowser1.Document
For I = 0 To Html.All.Count - 1
Tag = Html.All(I)
If Tag.TagName = "INPUT" Then
If Tag.GetAttribute("maxlength") = "12" Then
Tag.SetAttribute("value", "aaaaaaaaaa")
End If
End If
XXX:
Next
on error goto XXX
自动填写表单似乎并不适合QQ申请