vb webbrowser如何根据链接内容按链接
2个回答
展开全部
举个简单的例子吧
Dim strURL As String
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
WebBrowser1.Navigate strURL
End Sub
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
strURL = Text
End Sub
Private Sub Command1_Click()
WebBrowser1.Navigate "www.163.com"
End Sub
Dim strURL As String
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Cancel = True
WebBrowser1.Navigate strURL
End Sub
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
strURL = Text
End Sub
Private Sub Command1_Click()
WebBrowser1.Navigate "www.163.com"
End Sub
参考资料: http://zhidao.baidu.com/question/98388749.html
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询