自动执行html里的js
using mshtml;
IHTMLDocument2 HTMLDocument =(IHTMLDocument2) axWebBrowser1.Document;
mshtml.IHTMLWindow2 win = HTMLDocument.parentWindow;
string strScript = "onsubmit(3)";
win.execScript(strScript, "javascript");
或者
((mshtml.HTMLDocumentClass)axWebBrowser.Document).parentWindow.execScript( "func()", "JScript" );
在HTML中可以这样
window.execScript(ScriptCode, "javascript");