你的位置:首页 > 软件开发 > ASP.net > ActiveX(四) mshtml 命名空间 重要接口简介

ActiveX(四) mshtml 命名空间 重要接口简介

发布时间:2015-12-29 16:00:07
在上一篇随笔 ActiveX(三)ActiveX 调用 Js 中,我们已经可以获得js中window对象的强类型接口、即 mshtml.IHTMLWindow2 ,通过该接口、我们可以调用js函数。那么我们再试一试其他的方法呢,看看结果是否符合预期:   pri ...

  在上一篇随笔 ActiveX(三)ActiveX 调用 Js 中,我们已经可以获得js中get='_blank'>window对象的强类型接口、即 mshtml.IHTMLWindow2 ,通过该接口、我们可以调用js函数。那么我们再试一试其他的方法呢,看看结果是否符合预期:

  

    private void btnAlert_Click(object sender, EventArgs e)    {      if (this.window2 != null)      {        this.window2.alert("C#CodeAlert:" + this.txtPwd.Text);      }    }    private void btnLocation_Click(object sender, EventArgs e)    {      if (this.window2 != null && this.window2.location != null)      {        this.window2.alert(this.window2.location.toString());      }    }


 

海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com

原标题:ActiveX(四) mshtml 命名空间 重要接口简介

关键词:HTML

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。