找回密码
 加入
搜索
查看: 4064|回复: 4

[IE类操作] Autoit提交网页表单的时候无法提交

[复制链接]
发表于 2011-3-4 10:16:18 | 显示全部楼层 |阅读模式
环境: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="" />&nbsp;&nbsp;
  <b>密码</b> <input type="password" class="text" name="PASSWORD" onmouseover="this.focus()" onfocus="this.select()" value="" />&nbsp;&nbsp;
  <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")
发表于 2011-3-4 10:39:36 | 显示全部楼层
#include <IE.au3>
$oIE = _IECreate ("http://192.168.1.132:101/")
$oForm = _IEFormGetCollection ($oIE, 0)
$oQuery = _IEFormElementGetCollection ($oForm, 0)
_IEFormElementSetValue ($oQuery, "lixiang")
$oQuery = _IEFormElementGetCollection ($oForm, 1)
_IEFormElementSetValue ($oQuery, "111111li")
_IEFormSubmit ($oForm)
 楼主| 发表于 2011-3-4 11:08:41 | 显示全部楼层
感谢楼上, 但是还是无法提交。
发表于 2011-3-4 11:50:29 | 显示全部楼层
已经提交了,提交页面是:logincheck.php
你要看你的logincheck.php页面有无错误
 楼主| 发表于 2011-3-4 15:56:06 | 显示全部楼层
不行啊, 我不用AUTOIT,点登录,都是正常的啊
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-13 16:09 , Processed in 0.073451 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表