//debugger; try { if (this.WordApp == null) { this.WordApp = new ActiveXObject("Word.Application"); try { this.WordApp.Application.Caption = key; } catch (e) { } this.WordApp.Application.Visible = true; this.WordApp.DisplayAlerts = false; wpsoroffice = "office"; } else if (!this.WordApp.Application) this.WordApp = null; } catch (e) { this.WordApp = null; } if (this.WordApp == null) { this.WordApp = new ActiveXObject("WPS.Application"); try { this.WordApp.Application.Caption = key; } catch (e) { } this.WordApp.Application.Visible = true; this.WordApp.DisplayAlerts = false; wpsoroffice = "wps"; }
/** * 动态添加activex否则启动。 * */function CreateYFToolSocket_rfid(){var rfid_ocx = document.getElementById("rfid_ocx");if(!rfid_ocx){var divApplet = document.createElement("div");divApplet.innerHTML = '<OBJECT id="rfid_ocx" classid="clsid:1814628D-13BB-4794-A986-78212924E5F0" codebase="yfrfidtoolProj1.ocx#version=3,0,0,0"></OBJECT>';if(document.body)document.body.appendChild(divApplet);elsedocument.appendChild(divApplet);rfid_ocx = document.getElementById("rfid_ocx");}if(rfid_ocx){}else{return;}return rfid_ocx;}
function writeObject(){ var obj = document.getElementById("mydelphi"); if(!obj){ var divobj = document.createElement("div"); divobj.innerHTML = '<OBJECT id="mydelphi" classid="clsid:84864ABE-E805-436C-9683-F11C1BB72FC3" 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; }
var applet = document.getElementById("socketapplet"); if(!applet){ var divApplet = document.createElement("div"); divApplet.innerHTML = '<applet code="Applet" name="socketapplet"' +'id="socketapplet" archive="'+mainpath+'appletweb.jar" width=0 height=0>'; +'<param name=hostAddr value="'+mainpath+'">' +'</applet>'; if(document.body) document.body.appendChild(divApplet); else document.appendChild(divApplet); applet = document.getElementById("socketapplet"); } return applet;
js动态创建activex, 动态创建applet, 动态创建word, 动态创建wps
最新推荐文章于 2023-02-05 19:34:29 发布