如果用VB采集网页中的链接
谁知道代码怎么写呀

解决方案 »

  1.   

    <a href="http://www.udaonet.com" style=".....">有道网</a>
    怎么过滤sytle,同时采集<a ></a>之间的文字!
    最好把代码公布出来,让大家一起来分享
      

  2.   

    Dim A    For Each A In WebBrowser.Document.All        If UCase(A.tagName) = "A" Then
            sql = "insert into spidedata (link,title) values ('" & A.href & "','" & A.innerText & "')"
            conn.Execute sql
            DoEvents
            Text1.Text = Text1.Text + 1
            End If
        Next
      

  3.   

    Dim A    For Each A In WebBrowser.Document.All        If UCase(A.tagName) = "A" Then
            sql = "insert into spidedata (link,title) values ('" & A.href & "','" & A.innerText & "')"
            conn.Execute sql
            DoEvents
            Text1.Text = Text1.Text + 1
            End If
        Next能不能解释一下,谢谢
      

  4.   

    dim oItem as object
    for each oItem in webBrowser1.doc.getElementsByTagName("A")
       msgbox oItem.href
       msgbox oItem.innerText
    next