本帖最后由 pcl_test 于 2016-9-26 13:12 编辑
有一个网页~在网页里面有一个提交按钮~但是么有id也没有name~我用ie对象获取网页的所有元素,然后在循环遍历元素~想根据按钮的类型和value来抓到这个元素。。。然后进行一下点击~~但会怎么也无法获取~其他的网站就能够获取~~好奇葩~~向大神们求救!!~~~
这是我写的主要处理这个部分的代码~大神帮忙看看~ | Set WshShell = CreateObject("wscript.Shell") | | Set ie = CreateObject("InternetExplorer.Application") | | Set AllElement=ie.Document | | For i=0 To AllElement.all.length-1 | | if AllElement.all(i).tagname="submit" Then | | if AllElement.all(i).Value=" " Then | | AllElement.all(i).Click | | End If | | End if | | NextCOPY |
这个是网页上的按钮的html代码:
<input type="submit" value=" " onclick="changeFormActionPath('EVDELOGIN0Z001', this)" style="background:url('images/logon_button.jpg'); width:77px;height:28px;">
|