以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]错在哪了?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=83196)

--  作者:dqlgood
--  发布时间:2016/4/2 21:50:00
--  [求助]错在哪了?
Dim web As new System.Windows.Forms.WebBrowser
web.Navigate("http://qgqp.shdjt.com/gpdm.asp?gpdm=002741")
Do Until web.ReadyState = 4
    Application.DoEvents
Loop
For Each tr As object In web.Document.GetElementsByTagName("tr")
    Dim str As String = ""
    For Each td As object In tr.GetElementsByTagName("td")
        str &= td.InnerText & "   "
    Next
    output.show(str)
Next

为何得不到数据,从网页源码看变量名称好像也对呀?

--  作者:大红袍
--  发布时间:2016/4/3 10:42:00
--  

Dim web As new System.Windows.Forms.WebBrowser
web.Navigate("http://qgqp.shdjt.com/gpdm.asp?gpdm=002741")
Do Until web.Document IsNot Nothing
    Application.DoEvents
Loop

For Each tr As object In web.Document.GetElementsByTagName("tr")
    Dim str As String = ""
    For Each td As object In tr.GetElementsByTagName("td")
        str &= td.InnerText & "   "
    Next
    output.show(str)
Next