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