Getting contents of specific div element?

前端 未结 1 2000
醉梦人生
醉梦人生 2020-12-20 10:39

is it possible to get the contents of a tag from a web browser control like this:

contents
and then strip all HTML charact
相关标签:
1条回答
  • 2020-12-20 11:13
    Dim divs = WebBrowser1.Document.Body.GetElementsByTagName("div")
    
    For Each d As HtmlElement In divs
        If d.GetAttribute("className") = "desc" Then
            Return d.InnerText
        End If
    Next
    
    0 讨论(0)
提交回复
热议问题