<a href="http://shawls.yeah.net"></a>0D
find <a href=    and </a>get the http://shawls.yeah.net
      我是小山,我喜欢VB,现在在学习C#和.net的相关知识
         欢迎您使用: SourceCode Explorer(源代码数据库)
           当前版本: 1.0.690
               作者: Shawls
               来自: Http://www.dapha.net
           个人主页: Http://Shawls.Yeah.Net
             E-Mail: [email protected]
                 QQ: 9181729

解决方案 »

  1.   

    顺序查找<a href=和 </a>不就可以了吗
      

  2.   

    好象不只顺序查找那么简单吧?
    <a href>, </a>标签内还可能含有其它HTML标签,比如<FONT>.
      

  3.   

    '找到一个办法,就是有些麻烦,速度也有点慢,你看看能用吗?
    Private Sub Command1_Click()
        Dim strTemp As String
        Dim i As Integer
        
        strTemp = "<HTML>"
        strTemp = strTemp & "<HEAD>"
        strTemp = strTemp & "</HEAD>"
        strTemp = strTemp & "<BODY>"
        strTemp = strTemp & "<a href=""http://www.yahoo.com.cn""><font color=#4665b5>aaa</font></a>"
        strTemp = strTemp & "</BODY>"
        strTemp = strTemp & "</HTML>"
        
        WebBrowser1.Navigate "about:blank"
        WebBrowser1.Document.open
        WebBrowser1.Document.writeln strTemp
        WebBrowser1.Document.Close
        
        Dim Webobj
        Dim strTag
        Set Webobj = WebBrowser1.Document
        
        For i = 0 To Webobj.All.length - 1
            If UCase(Webobj.All(i).tagName) = "A" Then
                Set strTag = Webobj.All(i)
            End If
        Next i
        Print CStr(strTag)
    End Sub
      

  4.   

    忘了说明,需要追加 Microsoft Internet Controls