js 动态 activex 组件

function writeObject(){  
    var obj = document.getElementById("mydelphi");  
    if(!obj){  
        var divobj = document.createElement("div");  
        divobj.innerHTML = '<OBJECT id="mydelphi" classid="clsid:XXXXXXXXXXXXXXXXXXX" codebase="'+mainpath+'ActiveFormProj1.ocx#version=2,0,0,0" width=0 height=0 align=center hspace=0 vspace=0></OBJECT>';  
        if(document.body)  
            document.body.appendChild(divobj);  
        else  
            document.appendChild(divobj);  
  
        obj = document.getElementById("aaa");  
    }  
      
 
    return obj;  
}

 

posted on 2015-05-14 21:58  荣锋亮  阅读(578)  评论(0编辑  收藏  举报

导航