发布网友 发布时间:2022-04-24 11:23
共2个回答
热心网友 时间:2023-10-11 02:38
Private WithEvents wb As WebBrowser_V1
Private Sub Form_Load()
WebBrowser1.Navigate "http://www.baidu.com"
Set wb = WebBrowser1.Object
End Sub
Private Sub wb_NewWindow(ByVal URL As String, ByVal Flags As Long, ByVal TargetFrameName As String, PostData As Variant, ByVal Headers As String, Processed As Boolean)
WebBrowser1.Navigate URL
Processed = True
End Sub
热心网友 时间:2023-10-11 02:38
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
WebBrowser1.Navigate2 WebBrowser1.Document.activeElement.href
End Sub