我试图将我的表单与ActiveX对象集成,我看到了奇怪的行为。当我将硬编码的对象元素添加到html
时<OBJECT id="PlayerComponentX" style="LEFT: 0px; WIDTH: 362px; TOP: 0px; HEIGHT: 259px"
data=data:application/x-oleobject;base64,C8E7L7ZFLUeFnCABl+fZxwAIAABqJQAAxRoAAA==
classid=clsid:77783738-750A-4DD4-BF01-BB5D5DF0791A VIEWASTEXT></OBJECT>
我能够geteklementbyid并在运行时注入object元素时调用组件函数
var objElement = document.createElement('object');
objElement.classid = 'clsid:2F3BC10B-45B6-472D-859C-200197E7D9C7';
objElement.id = 'PlayerComponentX1';
objElement.name = objectId;
objElement.data = 'data:application / x - oleobject; base64, C8E7L7ZFLUeFnCABl + fZxwAIAABqJQAAxRoAAA ==';
this.config.element.appendChild(objElement);
并做同样的事情我失败并获得异常