摘要: 原先的代码为: IHTMLDocument2 doc = (IHTMLDocument2)webBrowser.Document; 但是运行时会提示:无法将类型“System.Windows.Forms.HtmlDocument”转换为“mshtml.IHTMLDocument2” 将代码修改为:IHTMLDocument2 doc = (IHTMLDocument2)webBrowser... 阅读全文
posted @ 2009-03-06 11:31 怪_怪 阅读(2423) 评论(1) 推荐(0) 编辑
摘要: 今天琢磨了一下如何用mshtml获得Javascript中function的返回值。我们以前都是用没mshtml.IHTMLWindow2接口的execScript方法来执行HTML文档中的javascript代码段,如 //awbMain为AxSHDocVw.AxWebBrowser控件 mshtml.IHTMLDocument2 doc = this.awbMain.Documen... 阅读全文
posted @ 2009-03-06 01:19 怪_怪 阅读(1551) 评论(0) 推荐(0) 编辑