自動登陸

'定義變量
Dim username,password,IE,ws
'ユーザ
username = "aaaaaaaa"
'パスワード
password = "00000000"

'調用IE程序
Set IE = CreateObject("InternetExplorer.Application")
IE.Top = 100
IE.Left= 100
IE.Width = 1280
IE.Height = 900

'IE.Navigate "http://localhost/tr-consumer/top"

IE.Navigate "http://localhost:9080/NBJimWeb/jhc014.do"
'窗口可視化
IE.Visible = True

'用循環語句確保網頁加載完畢才執行下面操作
Do while IE.ReadyState<> 4 or IE.busy

loop
'設置延遲時間
wscript.sleep 300
IE.document.getelementById("id").value=username
wscript.sleep 200
IE.document.getelementById("pass").value=password
wscript.sleep 200
IE.document.getelementById("login").click

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章