蓝老师我把代码发上来你帮我测试一下,先谢谢了
Dim web As New System.Windows.Forms.WebBrowser()
web.ScriptErrorsSuppressed = True '解决网页页面的脚本错误提示
web.Navigate("https://ggzy.zj.gov.cn/col/col1229682666/index.html?number=ggjyA02")
Do Until web.ReadyState = 4 AndAlso web.Document.GetElementById("7795744") IsNot Nothing
Application.DoEvents '绘制控件的代码即刻生效
Loop
Dim elems As Object
elems = web.Document.GetElementById("7795744").GetElementsByTagName("div") '可以根据你指定的参数,找出
For Each elem As System.Windows.Forms.HtmlElement In elems
If elem.getattribute("classname") = "fyxx_lsbox_r" Then
'msgBox(elem.Children(0).getattribute("title")) '这个有值
'msgBox(elem.Children(1).getattribute("herf")) '这个为空,没有数据
msgBox(elem.innerHtml)
End If
Next
[此贴子已经被作者于2023/9/27 9:53:12编辑过]