winform程序操作或执行javascript程序

必须在窗体类头部添加

[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
[System.Runtime.InteropServices.ComVisible(true)]

 调用web页面上的javascript方法

webBrowser.Document.InvokeScript("aa"); 

web页面调用winfom方法

window.external.SendWebMsgToWinform("msg"); 

posted on 2011-09-29 14:19  mingfeng  阅读(188)  评论(0编辑  收藏  举报

导航