How to validate an ActiveX Code as HTML5?
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
精彩评论