0

我试图将我的表单与 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 并调用组件函数

 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);

并且做同样的事情我失败了并得到了异常

4

0 回答 0