标签:object for exec end private rgs document button --
//项目中添加Micrsoft.mshtml引用
--c:/temp/temp.htm--
<html>
<script language="JavaScript">
var Temp = "Zswang 路过 :)";
</script>
</html>
using mshtml;
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Navigate(@"c:/temp/temp.htm");
}
private void button1_Click(object sender, EventArgs e)
{
IHTMLDocument2 vDocument = webBrowser1.Document.DomDocument as IHTMLDocument2;
IHTMLWindow2 vWindow = vDocument.parentWindow;
vWindow.execScript("document.title=Temp;", "JavaScript");
Text = vDocument.title;
}
http://blog.csdn.net/zswang/article/details/1622324
WebBrowser中获得脚本中的变量值
标签:object for exec end private rgs document button --
原文地址:http://www.cnblogs.com/findumars/p/6347919.html