Is there a “createObject” in javascript?

好久不见. 提交于 2019-12-10 14:56:44

问题


In VBScript there is a function called CreateObject, which can be run on a client through a webpage. I've used it before like this:

Set icaObj = CreateObject("Citrix.ICAClient")
CitrixVersion = icaObj.ClientVersion

To find out which version of the application was installed on the client machine.

Is there something comparable in JavaScript?


回答1:


Is there something comparable in JavaScript?

Not in JavaScript, but in Microsoft's JScript in limited environments, yes:

var icaObj = new ActiveXObject("Citrix.ICAClient");

And just like VBScript, this will only work in a very limited situation: Specificially, something running with Internet Explorer with full permissions (or, of course, in JScript running on the server).



来源:https://stackoverflow.com/questions/19414323/is-there-a-createobject-in-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!