您的位置:首页 > 编程语言 > VB

VBS 自动登录实现代码

2016-10-04 21:17 211 查看
代码如下:

on error resume next
url = " http://www.bathome.net/logging.php?action=login" username = "***"
password = "***"
set ie = CreateObject("InternetExplorer.Application")
ie.visible = true
ie.Navigate url,4 ' " http://www.baidu.com" do until 4=ie.readyState
WScript.sleep 200
waittime  = waittime + 200
if waittime > 15000 then exit do
loop
'WScript.echo waittime
if 4<>ie.readyState then
ie.quit
WScript.quit
end if
set dom = ie.document
set form = dom.getElementById("loginform")
form.all("username").value = username
form.all("password").value = password
form.all("cookietime").checked = true
form.all("loginsubmit").click()
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: