JS中的判断连接如何自动点击
<a href='status.htm.cgi' target='_self'class='menu01a' onClick='topframectl("../stat/left_Status_DeviceInfo.html", "status.htm.cgi", "../cgi-bin/baseinfo.htm.cgi")'>状态</a><SCRIPT language=javascript>
var user ='user123';
var sysusername ='user123';
if ( user != sysusername)
document.write("<a href='../cgi-bin/setup.htm.cgi' target='_self'class='menu01b' onClick='topframectl(\"../setup/manue_wireless_atheros.html\", \"../cgi-bin/setup.htm.cgi\", \"../cgi-bin/atheros_fbwlcfg.htm.cgi\")'>网络</a>");
else
document.write("<a href='../cgi-bin/setup.htm.cgi' target='_self'class='menu01b' onClick='topframectl(\"../setup/manue_broadbund.html\", \"../cgi-bin/setup.htm.cgi\", \"../cgi-bin/broadbund.htm.cgi\")'>链接</a>");
该使用哪种方法能点击网页中的链接这两个字呢?
一直没找到方法啊,
求助.. 搞了一天没搞出来,到处翻资料模仿了。
自己顶下 _ielinkclickbytxt 不是很明白这个。 按照例子试了下,似乎不行。不知道是不是错了。
#include <IE.au3>
$oIE = _IECreate("ADDRESS")
$sMyString = "连接"
$oLinks = _IELinkGetCollection($oIE)
For $oLink in $oLinks
$sLinkText = _IEPropertyGet($oLink, "innerText")
If StringInStr($sLinkText, $sMyString) Then
_IEAction($oLink, "click")
ExitLoop
EndIf
Next
这样?
页:
[1]