2020年6月11日 星期四

VB.net 取得所有Webbrowser 的element [Get WebBrowser Element]


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
                For Each webpageelement As HtmlElement In wbwPrincipal.Document.All
                    If webpageelement.GetAttribute("classname") = "icon-sakai-iframe-site" Then
                        strName = webpageelement.GetAttribute("href")
                    End If
                    If webpageelement.GetAttribute("classname") = "icon-sakai-lessonbuildertool" Then
                        strContenido = webpageelement.GetAttribute("href")
                    End If

                    If strName <> "" And strContenido <> "" Then
                        Dim strTmp As String = "http://smallgcok.com/access/site/" & Split(strName, "/")(5)
                        wbwPrincipal.Navigate(strTmp)
                        Exit For
                    End If
                Next

沒有留言:

張貼留言