如何将ActiveX代码验证为HTML5? [英] How to validate an ActiveX Code as HTML5?

查看:178
本文介绍了如何将ActiveX代码验证为HTML5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道... ActiveX ...哎呀!

I know ... ActiveX ... blarghhh!

在HTML中使用OCX对象的正常代码是:

the normal code for using an OCX Object in HTML is:

<object id="ActiveX" 
        classid="CLSID:DF3748A3-7F0B-47E9-BB32-233E591CAD65" 
        width="140" height="140" 
        codebase="http://domain.com/ActiveX.cab#version=1,0,0,0">
</object>

但是 HTML5文档指出,不再支持代码库 classid ,并且我应该使用 data type 代替...

but HTML5 docs states that codebase and classid are no longer supported and that I should use data and type instead...

我知道数据将保存 cab 文件的路径,但是我应该在<$ c c $ c> classid ?

I can get that the data will hold the path to the cab file, but where do I stick the classid ?

<!-- OCX -->
<object id="ActiveX" 
        classid="CLSID:DF3748A3-7F0B-47E9-BB32-233E591CAD65" 
        width="140" height="140"
        data="http://domain.com/ActiveX.cab#version=1,0,0,0" 
        type="application/octet-stream">
</object>

可以工作,但是因为我仍然有 classid 仍然不是有效的文档:-/

works, but because I still have classid is still not a valid document :-/

推荐答案

您可以添加一个注册表项,该注册表项会将模仿类型映射到CLSID,然后您可以只使用type =属性。

You can add a registry key that will map a mimetype to a CLSID and then you can just use the type="" attribute.

有关更多信息,请参见 http://msdn.microsoft.com/zh-cn/library/aa751976%28v=vs.85%29.aspx

For more info, see http://msdn.microsoft.com/en-us/library/aa751976%28v=vs.85%29.aspx

这篇关于如何将ActiveX代码验证为HTML5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆