简体   繁体   English

如何使用javascript中的IP地址创建ActiveXObject?

[英]How to create an activexobject using ip address in javascript?

I was trying the below code and getting "Automation server can't create object" error. 我正在尝试下面的代码,并收到“自动化服务器无法创建对象”错误。

function GetAppVersion(){ 函数GetAppVersion(){

var XLApp = new ActiveXObject("Excel.Application", "ipaddress"); 
return(XLApp.Version);

} }

but if I use new ActiveXObject("Excel.Application") then I am not getting this error. 但是,如果我使用新的ActiveXObject(“ Excel.Application”),则不会收到此错误。

Please help me to avoid getting error on above code. 请帮助我避免在上面的代码上出错。

Assuming you are running this from a web page loaded in Internet Explorer, see the documentation : 假设您是从Internet Explorer中加载的网页运行此程序的,请参阅文档

Creating an object on a remote server can only be accomplished when Internet security is turned off. 仅当关闭Internet安全性时,才能在远程服务器上创建对象。

Turn off Internet Security. 关闭互联网安全。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM