将网页代码用Webbrowser控件执行,怎么达成

2024-11-30 12:58:26
推荐回答(1个)
回答1:

Private Sub Command1_Click()
strExeFunc = "javascript:alert(""asd"")"
WebBrowser1.Document.parentWindow.execScript strExeFunc, "JavaScript"
End Sub

Private Sub Form_Load()
WebBrowser1.Navigate "about:blank"
End Sub

===========================================
不知道lz,想要的是不是这个?