dzztxiao 发表于 2011-3-17 23:10:45

有form,在input写不了数据_IEFormGetObjByName, $_IEStatus_NoMatch

我把部分源码贴上

<BODY style="FONT-SIZE: 13px; leftmargin: " text=#000000 bgColor=#ccccff topMargin=0 0?><TABLE borderColor=#000000 cellSpacing=0 borderColorDark=#ffffff cellPadding=0 width="100%" border=1>
<FORM name=form1 action=orderq2.php method=post target=leftFrame>
<TBODY>
<TR>
<TD>
<TABLE style="FONT-WEIGHT: bold; FONT-SIZE: 20px" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD>號碼:<INPUT style="FONT-WEIGHT: bold; FONT-SIZE: 20px" maxLength=4 size=8 name=no> 金額:<INPUT onkeypress="return checkNumber(event,this);" style="FONT-WEIGHT: bold; FONT-SIZE: 20px" maxLength=7 size=8 name=amount> <INPUT onclick=check24(); type=button value=轉24組></FONT> <A style="FONT-SIZE: 12px" href="mainq2_2.php">多碼同額 模式</A> <SPAN id=showamt>&nbsp;</SPAN>

chenlu_ling 发表于 2011-3-18 23:42:46

贴上你AU3代码啊 可能是你AU3代码有问题呢。。。

lynfr8 发表于 2011-3-19 01:28:36

#include <IE.au3>
$oIE = _IECreate (@ScriptDir&"\test.html")
_IELoadWait($oIE)
$oForm = _IEGetObjByid($oIE, "form1")
$a = _IEGetObjByName($oForm, 'no')
$b = _IEGetObjByName($oForm, 'amount')       
_IEFormElementSetValue($a, '8')       
_IEFormElementSetValue($b, '10000')       



与脚本放在同一目录测试

lynfr8 发表于 2011-3-19 02:32:26

楼主
在IE6打开目标链接http://***.com/vip/index.php的情况下运行即可输入
脚本第二行的的链接***部分你自己修改一下即可正常运行#include <IE.au3>
$oIE = _IEAttach("http://***/vip/index.php",'URL')
$oFrame = _IEFrameGetObjByName ($oIE, "mainFrame")
$oForm = _IEGetObjByid($oFrame, "form1")
$a = _IEGetObjByName($oForm, 'no')
$b = _IEGetObjByName($oForm, 'amount')      
_IEFormElementSetValue($a, '8')      
_IEFormElementSetValue($b, '10000')   

dzztxiao 发表于 2011-3-19 02:53:58

测试正常,非常感谢

lynfr8 发表于 2011-3-19 02:54:59

回复 5# dzztxiao


    小事,别客气,其他的功能你自己拓展吧,IE UDF还是蛮强大的.
页: [1]
查看完整版本: 有form,在input写不了数据_IEFormGetObjByName, $_IEStatus_NoMatch