本帖最后由 bcrun 于 2014-03-31 22:47:10 编辑

解决方案 »

  1.   

    从document的onclick事前可以做到
    如:
    Option Explicit
    Private WithEvents bDoc As HTMLDocumentPrivate Function bDoc_onclick() As Boolean
        Dim obj As IHTMLElement
        Set obj = bDoc.parentWindow.event.srcElement
        If obj.tagName = "A" Then Exit Function
        bDoc_onclick = True
    End FunctionPrivate Sub Command1_Click()
        Dim w1 As String
        w1 = "<a href='http://www.csdn.com'>点击试试</a>"
        WB.Document.body.innerhtml = w1
        Set bDoc = WB.Document
    End SubPrivate Sub Form_Load()
        WB.Navigate "about:blank"
    End Sub