Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
WebBrowser1.Document.GetElementById("xn_logout").InvokeMember("click")
End Sub
无法从网站单击注销链接我在这里做错了什么。
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
WebBrowser1.Document.GetElementById("xn_logout").InvokeMember("click")
End Sub
无法从网站单击注销链接我在这里做错了什么。
'WebBrowser1.Document.GetElementById("xn_username").InvokeMember("click")
Dim HtmlElementcoll As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
For Each elem As HtmlElement In HtmlElementcoll
' Check the attributtes you want
If elem.GetAttribute("dojotype") = "PostLink" Then
'Check even the text if you want
' If elem.InnerText = "Sign In" Then
'Invoke your event
elem.InvokeMember("click")
'End If
End If
Next
End Sub
根据我的研究,这就是我得到的..