Sub test() Dim ie Set ie = CreateObject("internetexplorer.application") ie.Visible = True ie.navigate "http://werdfas.comjasd.com" While ie.busy Or ie.readystate <> 4 Wend While ie.document.title <> "登 录" '根据页面标题判断打开页面是否正确或是不是需要操作的页面 Wend While ie.busy Or ie.readystate <> 4 Wend ie.document.logform.u6name.Value = "460" '赋值 ie.document.logform.p6wd.Value = "366" ie.document.logform.submit '这就是点击了 set ie=nothing '清空所占用内存 End Sub call test
2、使用FindWindowEx查找每个标签的句柄
3、使用PostMessage对每个句柄发送单击消息
2、使用FindWindowEx查找每个标签的句柄
3、使用PostMessage对每个句柄发送单击消息
Dim ie
Set ie = CreateObject("internetexplorer.application")
ie.Visible = True
ie.navigate "http://werdfas.comjasd.com"
While ie.busy Or ie.readystate <> 4
Wend While ie.document.title <> "登 录" '根据页面标题判断打开页面是否正确或是不是需要操作的页面
Wend
While ie.busy Or ie.readystate <> 4
Wend ie.document.logform.u6name.Value = "460" '赋值 ie.document.logform.p6wd.Value = "366"
ie.document.logform.submit '这就是点击了
set ie=nothing '清空所占用内存
End Sub call test