日期:2014-05-18 浏览次数:20860 次
/// <summary> /// 在winform中执行JS代码 /// </summary> /// <param name="func"></param> /// <param name="param"></param> /// <returns></returns> public object ExecJSfuncion(string func, object[] param) { return this.webBrowser1.Document.InvokeScript(func, param); }
------解决方案--------------------
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")] [System.Runtime.InteropServices.ComVisibleAttribute(true)] public partial class MainForm : Form