VS2005 WInform程序如何调用js
2007-11-13 16:37
501 查看
WebBrowser webBrowser = new WebBrowser();
webBrowser.Navigate(AppDomain.CurrentDomain.BaseDirectory + "/Test.html");//加载网页
mshtml.IHTMLDocument2 html = (mshtml.IHTMLDocument2)this.webBrowser.Document.DomDocument;
//mshtml.IHTMLDocument2 html = (mshtml.IHTMLDocument2)this.webBrowser.Document;//此方法在VS2005中不适用
mshtml.IHTMLWindow2 win = (mshtml.IHTMLWindow2)html.parentWindow;
win.execScript("document.getElementById('text').value += trans();", "javascript");//使用JS
this.richTextBox1.Text += this.webBrowser.Document.GetElementById("text").InnerHtml; //获取页面元素值
相关文章推荐
- [导入]VS2005 WInform程序如何调用js
- C# WinForm程序如何与js交互
- C# WinForm程序如何与js交互
- 求助:如何在ASP页面中调用Winform程序呢?
- C# WinForm程序如何与js交互
- C#winform程序如何与js交互
- C# WinForm程序如何与js交互
- C# WinForm程序如何与js交互??
- [收藏]C# WinForm程序如何与JS交互
- 在WinForm中用C#如何调用外部程序
- .NET2.0中,Winform程序如何异步调用Web Service呢?[Demo下载]——与.net1.1环境下比较
- C#winForm程序与html JS交互调用
- C# WinForm程序如何与js交互
- html中的js调用c#的winform程序
- js调用winform程序(带参数)
- C# WinForm程序如何与js交互
- c# webbrowser与winform交互访问,javascript参数调用控制程序
- asp.net中winform窗体程序如何打开浏览器,如何打开链接?
- 如何用js调用网页上嵌套的adobe reader 的打印按钮
- 浅谈如何在C#Winform程序中正确使用登录窗体