webbrowser 通过匿名函数返回值

来源:互联网 发布:霍顿社交网络 编辑:程序博客网 时间:2024/06/06 06:48
Private Sub cmdJsFunc_Click()    Dim retVal As String    Call WebBrowser1.Document.parentWindow.execScript("v = function(){return 3.14;}; tempJsVar=v();")    retVal = WebBrowser1.Document.Script.tempJsVar    MsgBox retValEnd Sub
0 0