WebBrowser的比较简单:
WebBrowser1.Document.InvokeScript("网页中js函数名")
AxWebBrowser执行JS代码:
Dim win As mshtml.IHTMLWindow2
win = (CType(AxWebBrowser1.Document, mshtml.HTMLDocument)).parentWindow
Dim strJs = "function T(){alert('你好');} T()"
win.execScript("网页中JS函数名", "Javascript")
'win.execScript(strJs, "Javascript")
咨询电话
暂无