如何点击超链接?这不起作用:
For Each link As HtmlElement In WebBrowser1.Document.links
If link.Id = "aw0" Then link.InvokeMember("click")
End If
我也测试过但不起作用:
For Each link As HtmlElement In WebBrowser1.Document.All
If link.Id = "aw0" Then link.InvokeMember("click")
End If
非常感谢您可以给我 html 代码的帮助(在结尾和开头添加 XXX):
XXX
<a id="aw0" onclick="ha('aw0')" onmouseover="ss('aw0')" onmousedown="st('aw0')" onfocus="ss('aw0')" href="http://www.googleadservices.com/pagead/aclk?sa=L&ai=Cipw0bBNtUrPCHsv6lwfq94CYDfewvpYE94WymWmPmu_vtAEQASC1r7odUIHZkPD5_____wFg3wagAbHMgdsDyAEDqAMByAPRBKoEtwFP0L7rS8-9paQxCTUyZESQJzOPdjEdKJ0Zk1qW8Pxb-_gFIsc5rR2IVMolQIQLKLyzzXWOTMpaw-aw5-zREkJW-mr0oIQwefOmZQ3g-WICLextR0cqUQ5WMBlDhbE7hVkUrO9w1DSaelMB0w6h5wtWFTBJhdyYhI6OtK1eJxLGF7jTXjPKh_cFcFuSiVPXEZ0dbUiY7MhBnLE1NWdxW6zMZpq5cksIcWmyB2LPR2tzSHBSejxpdFmIBgGgBgOAB7ez_iQ&num=1&cid=5GhDZU7LmPU6sc2EZFIxnrEM&sig=AOD64_39YXAPda7_EhRqOzt7N1zd4Qwv5w&client=ca-pub-8816737085743685&adurl=http://www.ipage.com/ipage/index.html%3FAffID%3D610295&nm=4&mb=4&bg=!A0S98OsStOqebgIAAAA_UgAAAB8qANfrfsKWmkLPJIvsr9J41Ep5RKon8tnxRgyDba0CdKXf9H3pfjN38Pvoq2_a24AZW-9tR0XtooXT-35s10fLhgHjTIlb3-XSFJm3j5aumFw2SgzvaNrin68fJaUkjkX3d_h3DB5wtU-8tzM8I6q_MavHQGfWlYSmxf3SDecBES9yp5ZGggLLglMNrKl14O6ld6UmOOE_bLuvf3rpV0jMzsIvICucMvkTKkSw_txxmbB522h5l3bzeCQHyerBj9sge5B-cY0ErS9YysyU5jVGfsXnxE1GtWuh-w" target="_top">
<img class="img_ad" width="336" height="280" border="0" alt="" src="http://pagead2.googlesyndication.com/simgad/14804917093678466323"></img>
</a>
<style> … </style>
<div id="abgc"> … </div>
<script> … </script>
<script src="http://pagead2.googlesyndication.com/pagead/js/r20131022/r20110914/abg.js"></script>
XXX