Dim lis As System.Windows.Forms.HtmlElementCollection = web.Document.GetElementsByTagName("div") \'获得当前页面的A标签HTML元素集合 Dim count As Integer = 0 For Each li As object In lis If li.GetAttribute("ClassName") = "main-content" Then msgbox("找到类名为 main-content 的类") output.show(li.Innertext)
。。。。。。
-- 作者:有点蓝
-- 发布时间:2020/2/16 20:00:00
-- Dim lis As System.Windows.Forms.HtmlElementCollection = web.Document.GetElementsByTagName("a")
For Each a As object In lis
output.show(a.GetAttribute("href"))
next
Dim lis As System.Windows.Forms.HtmlElementCollection = web.Document.GetElementsByTagName("img")