Dim UserName, PassWord
Private Sub Command1_Click()
WebBrowser1.Navigate "http://emailreg.qq.com/cgi-bin/signup/step1?regtype=0"
End SubPrivate Sub Command2_Click()
Randomize
'随机账号
UserName = "yanhuapiaopiao"
For i = 1 To 4
UserName = UserName & Int(Rnd * 10)
Next
'密码^_^ 宣传下自己。。
PassWord = "yanhuapiaopiao"
Caption = "账号:" & UserName & " 密码:" & PassWord & " 开始注册"
'填写生日
Set oOption = WebBrowser1.Document.createElement("OPTION")
oOption.innerText = "6"
oOption.Value = "6"
WebBrowser1.Document.getElementsByTagName("select")(3).appendChild (oOption)
For Each a In WebBrowser1.Document.getElementsByTagName("OPTION")
If a.Value = "1986" Or a.Value = "6" Then a.Selected = True
Next
'填写 账号 昵称 密码
WebBrowser1.Document.getElementsByTagName("INPUT")(2).Value = UserName
WebBrowser1.Document.getElementsByTagName("INPUT")(4).Value = "烟花飘飘"
WebBrowser1.Document.getElementsByTagName("INPUT")(7).Value = PassWord
WebBrowser1.Document.getElementsByTagName("INPUT")(8).Value = PassWord
@这是一位高手的一部分代码,我有些地方看不懂,就是最后那4行,那些2,4,7,8是不是下标呀,我是这样想的。但是打开网页,我怎么也数不对。我觉得对应INPUT来说,不应该是这样吗
WebBrowser1.Document.getElementsByTagName("INPUT")(1).Value = UserName
WebBrowser1.Document.getElementsByTagName("INPUT")(2).Value = "烟花飘飘"
WebBrowser1.Document.getElementsByTagName("INPUT")(3).Value = PassWord
WebBrowser1.Document.getElementsByTagName("INPUT")(4).Value = PassWord
请高手解答。
Private Sub Command1_Click()
WebBrowser1.Navigate "http://emailreg.qq.com/cgi-bin/signup/step1?regtype=0"
End SubPrivate Sub Command2_Click()
Randomize
'随机账号
UserName = "yanhuapiaopiao"
For i = 1 To 4
UserName = UserName & Int(Rnd * 10)
Next
'密码^_^ 宣传下自己。。
PassWord = "yanhuapiaopiao"
Caption = "账号:" & UserName & " 密码:" & PassWord & " 开始注册"
'填写生日
Set oOption = WebBrowser1.Document.createElement("OPTION")
oOption.innerText = "6"
oOption.Value = "6"
WebBrowser1.Document.getElementsByTagName("select")(3).appendChild (oOption)
For Each a In WebBrowser1.Document.getElementsByTagName("OPTION")
If a.Value = "1986" Or a.Value = "6" Then a.Selected = True
Next
'填写 账号 昵称 密码
WebBrowser1.Document.getElementsByTagName("INPUT")(2).Value = UserName
WebBrowser1.Document.getElementsByTagName("INPUT")(4).Value = "烟花飘飘"
WebBrowser1.Document.getElementsByTagName("INPUT")(7).Value = PassWord
WebBrowser1.Document.getElementsByTagName("INPUT")(8).Value = PassWord
@这是一位高手的一部分代码,我有些地方看不懂,就是最后那4行,那些2,4,7,8是不是下标呀,我是这样想的。但是打开网页,我怎么也数不对。我觉得对应INPUT来说,不应该是这样吗
WebBrowser1.Document.getElementsByTagName("INPUT")(1).Value = UserName
WebBrowser1.Document.getElementsByTagName("INPUT")(2).Value = "烟花飘飘"
WebBrowser1.Document.getElementsByTagName("INPUT")(3).Value = PassWord
WebBrowser1.Document.getElementsByTagName("INPUT")(4).Value = PassWord
请高手解答。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货