c# 如何在webbrowser控件执行一段JS代码

var doc = this.WebBrowser.Document.DomDocument as IHTMLDocument2;
var win = doc.parentWindow as IHTMLWindow2;

string jscode = @"

  //这里写JS代码

 ";

win.execScript(jscode, "javascript");

 

  

 

posted @ 2016-12-20 09:45  怕死就别活着  阅读(2180)  评论(0编辑  收藏  举报