开发者

How to validate an ActiveX Code as HTML5?

开发者 https://www.devze.com 2023-04-12 15:51 出处:网络
I know ... ActiveX ... blarghhh! the normal code for using an OCX Object in HTML is: <object id=\"ActiveX\"

I know ... ActiveX ... blarghhh!

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>

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

I can get that the data will ho开发者_开发知识库ld 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>

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


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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号