请指教下这个网页中的 连接 怎么不能点击?
本帖最后由 fylxz 于 2011-7-28 22:43 编辑用这种方式不能点击
$oInputs = _IETagNameGetCollection ($oIE, "INPUT")
For $oInput In $oInputs
if $oInput.value = " 新增 " then
_IEAction ($oInput, "click")
网页源代码如下
<FIELDSET style="HEIGHT: 80px" id=FIELDSET1 align=middle><LEGEND align=center>功能</LEGEND>
<DIV style="WIDTH: 100%" id=Panel1>
<TABLE id=TABLE1 border=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD style="HEIGHT: 28px" align=middle><INPUT id=B_Add value=" 新增 " type=submit name=B_Add> <INPUT id=B_Edit value=" 修改 " type=submit name=B_Edit> <INPUT id=B_Del value=" 删除 " type=submit name=B_Del><BR><BR><INPUT id=B_Find onclick="return FindAuto();" value=" 查找 " type=submit name=B_Find> <INPUT id=B_print onclick=B_Print_Click() value=" 打印 " type=button name=B_print></TD></TR></TBODY></TABLE></DIV></FIELDSET> </TD></TR>
<TR>
<TD style="WIDTH: 253px" vAlign=top align=middle>
<FIELDSET style="HEIGHT: 250px" align=middle><LEGEND align=center>提示信息</LEGEND>
<TABLE border=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD style="HEIGHT: 234px" vAlign=center align=middle><SPAN style="BACKGROUND-COLOR: transparent; WIDTH: 240px; DISPLAY: inline-block; HEIGHT: 180px" id=MsgBox>
<TABLE class=darmsgbox border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD height=3 width="100%"><B class=b1></B><B class=b2></B><B class=b3></B><B class=b4></B></TD></TR>
<TR>
<TD class=boxcontent>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD class=img><IMG style="WIDTH: 65px; HEIGHT: 65px".
这是不是有post表单,下面两个依然不能用,请大大们帮 怎么没人帮忙呢!!!!{:face (370):}
#include <IE.au3>
$oIE = _IECreate("file://\\192.168.0.108\tmp$\新建文件夹 (3)\Autoit_ACN\CLICK_TEST.HTM")
;$sHTML = "<h1>Hello World!</h1>"
;_IEBodyWriteHTML ($oIE, $sHTML)
$oInputs = _IETagNameGetCollection($oIE, "INPUT")
For $oInput In $oInputs
If $oInput.value = " 新增 " Then
MsgBox(0,0,"找到了~~~")
_IEAction($oInput, "click")
EndIf
Next
#include <IE.au3>
$oIE = _IECreate()
$sHTML = "<FIELDSET style=""HEIGHT: 80px"" id=FIELDSET1 align=middle><LEGEND align=center>功能</LEGEND> " & _
"<DIV style=""WIDTH: 100%"" id=Panel1> " & _
"<TABLE id=TABLE1 border=0 cellSpacing=0 width=""100%""> " & _
"<TBODY> " & _
"<TR> " & _
"<TD style=""HEIGHT: 28px"" align=middle><INPUT id=B_Add value="" 新增 "" type=submit name=B_Add ONCLICK=""alert('ok!')""> " & _
"<INPUT id=B_Edit value="" 修改 "" type=submit name=B_Edit> " & _
"<INPUT id=B_Del value="" 删除 "" type=submit name=B_Del><BR><BR>" & _
"<INPUT id=B_Find onclick=""return FindAuto();"" value="" 查找 "" type=submit name=B_Find> " & _
"<INPUT id=B_print onclick=B_Print_Click() value="" 打印 "" type=button name=B_print></TD></TR></TBODY></TABLE></DIV></FIELDSET> </TD></TR> "
_IEBodyWriteHTML($oIE, $sHTML)
$oInputs = _IETagNameGetCollection($oIE, "INPUT")
For $oInput In $oInputs
If $oInput.value = " 新增 " Then
MsgBox(0, 0, "找到了~~~")
_IEAction($oInput, "click")
EndIf
Next
你换个试试,比如$input.id=B_Add
页:
[1]