|
环境:win7 , IE9浏览器
网页源代码:
<body onload="javascript:document.form1.UNAME.focus();">
<div align="center">
<form name="form1" method="post" action="logincheck.php" autocomplete="off" onsubmit="return CheckForm();">
<div class="login_div" align="center">
<b>用户名</b> <input type="text" class="text" name="UNAME" maxlength="20" onmouseover="this.focus()" onfocus="this.select()" value="" />
<b>密码</b> <input type="password" class="text" name="PASSWORD" onmouseover="this.focus()" onfocus="this.select()" value="" />
<input type="submit" class="submit" value="登 录" />
</div>
<br>
<br>
</form>
AUTOIT源代码:
#include <IE.AU3>
$oIE = _IECreate("http://192.168.1.132:101/")
$Forminfo = _IEFormGetObjByName($oIE,"form1")
$oQuery = _IEFormElementGetObjByName($Forminfo,"UNAME")
_IEFormElementSetValue($oQuery,"lixiang")
$oQuery=_IEFormElementGetObjByName($Forminfo,"PASSWORD")
_IEFormElementSetValue($oQuery,"111111li")
$oQuery=_IEFormElementGetObjByName($Forminfo,"submit")
_IEAction($oQuery,"click") |
|