Private Sub Command1_Click() '新型农村合作医疗管理平台_用户登陆 On Error Resume Next With CreateObject("internetexplorer.application") .Visible = True .Navigate "http://125.46.57.85/hnxnh/login/login.aspx" Do Until .ReadyState = 4 DoEvents Loop .document.All("TB_userid").Value = "用户名" .document.All("TB_userpwd").Value = "密 码" Set r = .document.All.tags("div") For i = 0 To r.Length - 1 If r(i).ID Like "chec*" Then .document.All("Tb_yzm").Value = r(i).innerText Exit For End If Next i .document.All("ImageButton1").Click End With End Sub
Private Sub Command1_Click() '新型农村合作医疗管理平台_用户登陆 On Error Resume Next With CreateObject("internetexplorer.application") .Visible = True .Navigate "http://125.46.57.85/hnxnh/login/login.aspx" Do Until .ReadyState = 4 DoEvents Loop .document.All("TB_userid").Value = "用户名" .document.All("TB_userpwd").Value = "密 码" .document.All("Tb_yzm").Value = .document.getelementbyid("checkCode").innerText '验证码 .document.All("ImageButton1").Click End With End Sub
On Error Resume Next
With CreateObject("internetexplorer.application")
.Visible = True
.Navigate "http://125.46.57.85/hnxnh/login/login.aspx"
Do Until .ReadyState = 4
DoEvents
Loop
.document.All("TB_userid").Value = "用户名"
.document.All("TB_userpwd").Value = "密 码"
Set r = .document.All.tags("div")
For i = 0 To r.Length - 1
If r(i).ID Like "chec*" Then
.document.All("Tb_yzm").Value = r(i).innerText
Exit For
End If
Next i
.document.All("ImageButton1").Click
End With
End Sub
的验证码居然是字符格式的,而不是图片。。汗啊。知道用户名就可以穷举猜密码了。
Private Sub Command1_Click() '新型农村合作医疗管理平台_用户登陆
On Error Resume Next
With CreateObject("internetexplorer.application")
.Visible = True
.Navigate "http://125.46.57.85/hnxnh/login/login.aspx"
Do Until .ReadyState = 4
DoEvents
Loop
.document.All("TB_userid").Value = "用户名"
.document.All("TB_userpwd").Value = "密 码"
.document.All("Tb_yzm").Value = .document.getelementbyid("checkCode").innerText '验证码
.document.All("ImageButton1").Click
End With
End Sub