Dim web As new System.Windows.Forms.WebBrowser
web.ScriptErrorsSuppressed = True
web.Navigate("http://www.gzwengan.jcy.gov.cn/gzdt/")
Do Until web.ReadyState = 4
Application.DoEvents
Loop
Dim pg = web.Document.GetElementById("prevPage ").GetElementsByTagName("a")
Dim mpg As Integer = 1
If pg.count > 1 Then
mpg = pg(pg.count-2).Innertext
output.show(mpg)
End If
For i As Integer = 1 To mpg
web.Navigate( "http://www.gzwengan.jcy.gov.cn/gzdt/index_" & i & ".shtml")
Do Until web.ReadyState = 4
Application.DoEvents
Loop
'Dim i As Integer = 0
'Dim tb1s = web.document.GetElementsByTagName("table")(36)
'For Each tb1 As object In tb1s.GetElementsByTagName("tr")
'Dim sa = tb1.GetElementsByTagName("a")
'If sa.count > 0 Then
'Dim a = sa(0)
'Dim dr As DataRow = DataTables("官网文章").AddNew()
'Dim fwdw As WinForm.ComboBox = e.Form.Controls("ComboBox1")
'Dim lmfl As WinForm.ComboBox = e.Form.Controls("ComboBox2")
'dr("单位") = fwdw.Value
'dr("文章标题") = a.innertext
'dr("文章分类") =lmfl.Value
'dr("网址") = a.GetAttribute("href")
'Dim shijian As String = (FileSys.GetName(a.GetAttribute("href")).Insert(5,"-")).Insert(8,"-")
'Dim Parts() As String = shijian.Split("_")
'dr("发布时间") =Parts(0).Remove(0,1)
'End If
Next
''Next