如何使用 C++ 填充 Web 浏览器中的输入控件?
我有可以读取国民身份证的智能卡读卡器,但在它用来读取的 SDK 和示例项目中是使用 C++ 的 Boland C++ 项目。
我的产品是一个 Web 应用程序,有一个表单供用户填写并仅在 Internet Explorer 7,8 中运行。
如何使用 C++ 在 Web 浏览器中填写 Web 表单
I have SmartCard Reader which can read a National ID Card, but in the SDK and Sample project that it use to read is a using Boland C++ Project using C++.
My product is a web application and have a form providing to user fill in and run it only in Internet Explorer 7,8.
How to use C++ to fill a web form in the Web Browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将读取智能卡的功能包装为 ActiveX 控件,并导出允许表单查询该控件的必要方法。在表单中,编写将根据其 GUID 实例化 ActiveX 控件的 Javascript,并调用导出的方法以从智能卡检索数据并填充表单。
为此,您需要允许 IE 运行 ActiveX 控件(默认情况下这是禁用的),并安装该控件。如果无法实例化控件,您还可以通过提供链接,使用户可以轻松地从服务器下载控件。
您还可以使用 Javascript 在 ActiveX 控件信号和事件(例如卡插入)时触发,但这是可选的。
You wrap the functionality of reading the smart card as an ActiveX control, and export the necessary methods that will allow the form to query the control. At the form, write Javascript that will instantiate the ActiveX control, based on its GUID, and call your exported methods to retrieve the data from the smart card and populate the form.
For this to work, you need to allow IE to run ActiveX controls (by default this is disabled), and also install the control. You can also make it simple for your user to download the control from your server by providing a link if the control cannot be instantiated.
You may also use Javascript to trigger when the ActiveX control signals and event (for example card insertion), but that's optional.