登录 注册
当前位置:主页 > 资源下载 > 16 > JavaScript被C++调用

JavaScript被C++调用

  • 更新:2024-11-06 23:23:20
  • 大小:46KB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:C++ - 后端
  • 格式:RAR

资源介绍

Sometimes, when we are using the IE Browser Control inside of a C++ application, we need to access the HTML elements. We can do it by using standard COM objects such as IWebBrowser2, IHTMLDocument2, and so forth. By doing this, we easily can implement features such as click button, click anchor, get input string, get HTML text, and so on. Unfortunately, Microsoft did not provide similar objects for JavaScript. In any case, it is possible to make a control for the JavaScript object inside an HTML page by using a traditional COM approach. This article describes the class CWebPage that allows you to do it and a technique to call a JavaScript function from C++ code Thanks:http://www.codeguru.com/ieprogram/JSCalls.html