读书人

求:淘宝要如何才能自动登录呢?试了get

发布时间: 2012-02-23 22:01:35 作者: rapoo

求:淘宝要怎么才能自动登录呢?试了getelementById和sendkeys都不行.每次手输太麻烦了
求:淘宝要怎么才能自动登录呢?试了getelementById和sendkeys都不行,没反应.每次手输太麻烦了.
------------------
方法1:
ie.Navigate "https://login.taobao.com/member/login.jhtml?f=top&redirectURL=http%3A%2F%2Fwww.taobao.com%2F"
Do
Loop Until ie.ReadyState = 4
ie.Document.getElementById("TPL_username_1").Value = "111111111111111111111111"
ie.Document.getElementsByName("TPL_password").Value = "1111111111111111111111111111"
-------------------------------------
方2:

ie.Navigate "https://login.taobao.com/member/login.jhtml?f=top&redirectURL=http%3A%2F%2Fwww.taobao.com%2F"
Do
Loop Until ie.ReadyState = 4
Dim user
For Each user In ie.Document.All
If LCase(user.tagName) = "input" Then
If LCase(user.Type) = "text" Then
If user.id = "TPL_username_1" Then
SendKeys "11111111111111111111111111111111"
End If
End If
End If
Next
-------------------------------------------------
方3:
ie.Document.getElementById("TPL_username_1").focus
SendKeys "1111111111111111111111111111111"
ie.Document.getElementsByName("TPL_password").focus
SendKeys "11111111111111111111111111111111"

谢谢!!

[解决办法]
用阿里旺旺登

读书人网 >VB

热点推荐