本帖最后由 xulinghai 于 2019-8-23 16:27 编辑 #include <IE.au3>
Local $oIE = _IECreate("http://www.jxzyz.cn/",0,1,1,1)
_IELoadWait($oIE)
$select = _IEGetObjByName($oIE, "select")
$select.value = 1 ;选择志愿组织
$userinput = _IEGetObjByName($oIE, "user")
$userinput.value = "china" ;为登录名框赋值
$passwordInput = _IEGetObjByName($oIE, "password")
$passwordInput.value = "12345678" ;为密码框赋值
$dlbutton = _IEGetObjByName($oIE, "submit2")
_IEAction($dlbutton,"click")
;_IELoadWait($oIE)
点击“登录”按钮没效果,搜索了本论坛相关,点击登录按钮是javascrip的 onclick,不懂求助高手解答。
因为电脑装了360浏览器,_IECreate每次打开都是360,经搜索论坛,用ShellExecute解决了。#include <IE.au3>
ShellExecute("iexplore.exe", "http://www.jxzyz.cn/")
While 1
Local $oIE = _IEAttach("http://www.jxzyz.cn/", "url")
If Not @error Then ExitLoop
Sleep(200)
WEnd
_IELoadWait($oIE)
$select = _IEGetObjByName($oIE, "select")
$select.value = 1 ;选择志愿组织
$userinput = _IEGetObjByName($oIE, "user")
$userinput.value = "China" ;为登录名框赋值
$passwordInput = _IEGetObjByName($oIE, "password")
$passwordInput.value = "12345678" ;为密码框赋值
$dlbutton = _IEGetObjByName($oIE, "submit2",1)
_IEAction($dlbutton,"click") ;点击“登录”按钮
|