javascript/vb“new ActiveXObject()”中使用的对象的技术名称是什么?
您可以在 Windows 的 javascript/vb shell 中创建一些对象,如下所示:
x = new ActiveXObject("name");
x.aMethod();
它们的技术名称是什么(ATL?ActiveX?ActiveX 控件?自动化?或...?
)它们与可以在 IE 中使用的对象不同:
<object id="aName" classid="CLSID:1234567-..." codebase="http://somewhere"></object>
There are objects which you can create in Windows' javascript/vb shell like this:
x = new ActiveXObject("name");
x.aMethod();
What is the technical name for them (ATL? ActiveX? ActiveX control? Automation? or...?)
And how are they different from objects that can be used in IE this way:
<object id="aName" classid="CLSID:1234567-..." codebase="http://somewhere"></object>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(3)
来自 MSDN 中 ActiveXObject 函数的文档:
一个为自动化对象提供接口的对象。
自动化对象是一个 COM 对象,其类公开 IDispatch。
ActiveX控件严格来说是为容器设计的。 OLE 接口(如 IOleObject 和 IOleControl)定义了控件与其宿主之间的契约。 ActiveX 可能会也可能不会通过 IDispatch 提供自动化接口。如果 ActiveX 确实提供自动化接口,我们将其称为双接口 ActiveX 或可脚本化 ActiveX,这意味着 ActiveX 可以在后期绑定语言(如 Jscript)中使用。
ATL 是 Visual C++ 中的一个类库。是的,它旨在编写 ActiveX ,但它也可以用于编写 Windows 服务和其他库(例如 MFC)和应用程序。当然,编写ActiveX并不是必须的,在ActiveX发明之前,已经编写了很多ActiveX控件。
还有许多其他组件也与 ActiveX 相关。 ActiveX 文档(例如Adobe Reader、Microsoft Word)是一种可以托管在ActiveX 文档服务器(例如Internet Explorer 框架)中的文档类型。支持ActiveX 的应用程序(例如Microsoft Word、Windows Media Player)在其自己的进程中运行,但可以通过自动化接口实现自动化。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
Internet Explorer 将两者称为ActiveX 控件(请参阅类型列如下图中)
通过 JavaScript 实例化的 ActiveX 控件由编程标识符 (ProgID) 引用,并且没有用户界面。作为
Internet Explorer refers to both as ActiveX controls (see the Type column in the image below)
ActiveX controls instantiated through JavaScript are referred to by Programmatic Identifier (ProgID) and have no user interface. Controls placed in the document as
<object>
tags, commonly referred to as user controls, are specified by Class Identifier (ClassID) and may have a user interface.<object>
tags also inherit various traits of HTML elements.