开发者

How to click link in webbrowser

开发者 https://www.devze.com 2023-02-25 18:05 出处:网络
i am t开发者_如何学运维rying to click a div a link in the webrowser in vb6 without success, the structure of the link is like this

i am t开发者_如何学运维rying to click a div a link in the webrowser in vb6 without success, the structure of the link is like this

<a class="classname">
    <div class="classname2"></div>
    <span class="span">spantext</span>
</a>


You can navigate DOM from outside like this

WebBrowser1.Application.Document.all("id_or_name").Click

or you can execute JScript to do whatever you want from inside like this

WebBrowser1.Application.Document.parentWindow.execScript "id_or_name.click();"
0

精彩评论

暂无评论...
验证码 换一张
取 消