如何使用WebBrowser控件执行页面的JavaScript脚本,WebBrowser执行JavaScript脚本
1。引用C:\WINDOWS\assembly\GAC\Microsoft.mshtml\7.0.3300.0__b03f5f7f11d50a3a\Microsoft.mshtml.dll
Dim win As mshtml.IHTMLWindow2 = CType(webdocin.Document.Window.DomWindow, mshtml.IHTMLWindow2) win.parent.execScript("showUrlUpload()", "javascript") Dim doc = webdocin.Document doc.All("fileurl").SetAttribute("Value", "zz")
搞定!