Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
好的,我已经尝试了很多次才能做到这一点,但总是失败......有人可以帮我点击这个按钮吗?代码是...
<a class="single_like_button btn3-wrap" onclick="openFbLWin_306925();"> <span> </span> <div class="btn3">Like</div> </a>
感谢:D
首先,您需要获取元素,然后调用正确的成员,例如:
For Each elem As HtmlElement In webBrowser1.Document.GetElementsByTagName("a") If elem.GetAttribute("class") = "single_like_button btn3-wrap" Then elem.InvokeMember("onclick") End If Next
尝试更改"class"为"classname"有时需要第二个。
"class"
"classname"