最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ActiveXObject constructor list of parameters - Stack Overflow

programmeradmin2浏览0评论

ActiveXObject() constructor support different types of parameters as follows:

new ActiveXObject("Msxml2.DOMDocument"); 
new ActiveXObject("Msxml2.XSLTemplate"); 
new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
new ActiveXObject("Msxml2.DOMDocument.6.0"); 
new ActiveXObject("Microsoft.XMLHTTP"); 
new ActiveXObject("Microsoft.XMLDOM"); 
new ActiveXObject("Excel.Application");
new ActiveXObject("Word.Application");
new ActiveXObject("Excel.Sheet");

Where would I find these parameters(activexobject constructor)?

from this link, I found some information as follows

new ActiveXObject(class[, servername]);

class uses the syntax library.object where library is the name of the application (e.g., Word, Excel) or library containing the object, and object is the type or class of the object to create. servername (an optional argument) specifies the name of the server on which the object resides.

ActiveXObject() constructor support different types of parameters as follows:

new ActiveXObject("Msxml2.DOMDocument"); 
new ActiveXObject("Msxml2.XSLTemplate"); 
new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
new ActiveXObject("Msxml2.DOMDocument.6.0"); 
new ActiveXObject("Microsoft.XMLHTTP"); 
new ActiveXObject("Microsoft.XMLDOM"); 
new ActiveXObject("Excel.Application");
new ActiveXObject("Word.Application");
new ActiveXObject("Excel.Sheet");

Where would I find these parameters(activexobject constructor)?

from this link, I found some information as follows

new ActiveXObject(class[, servername]);

class uses the syntax library.object where library is the name of the application (e.g., Word, Excel) or library containing the object, and object is the type or class of the object to create. servername (an optional argument) specifies the name of the server on which the object resides.

Share Improve this question edited Jul 28, 2015 at 6:55 Premraj asked May 22, 2015 at 9:56 PremrajPremraj 74.8k26 gold badges244 silver badges184 bronze badges 5
  • 1 in the MSDN page: "You may be able to identify servername.typename values on a host PC in the HKEY_CLASSES_ROOT registry key. For example, here are a few examples of values you may find there, depending on which programs are installed:" – Daniel A. White Commented May 22, 2015 at 11:20
  • 1 the registry points at what is valid. – Daniel A. White Commented May 22, 2015 at 11:45
  • javascript vs registry key I don't understand the similarities – Premraj Commented May 22, 2015 at 11:51
  • 3 its what IE consults to point at the code. – Daniel A. White Commented May 22, 2015 at 11:52
  • related questions stackoverflow./q/7022568/1697099 stackoverflow./q/4696158/1697099 – Premraj Commented Jul 9, 2015 at 8:37
Add a ment  | 

3 Answers 3

Reset to default 6

ActiveX objects are binary extensions to Internet Explorer that (generally) add features that would otherwise not be supported by the browser.

When you install an ActiveX control, it modifies the system's Registry to register various interfaces and entry points so that the control is properly launched when a webpage asks for it.

ActiveX controls are generally created to extend the browser in specific ways; that is, they're designed to solve problems that may not be useful for learning JavaScript. Microsoft doesn't document the internal structure of many ActiveX controls, but you may be able to find information by searching the MSDN library for the name of the object you're interested in.

For example, here are the results of a search for Msxml2.DOMDocument.

As you may notice, this list isn't terribly useful.

You may find better luck searching for tutorials that teach web concepts by focusing on the feature you're interested in, such as XML.

(Also, you should be aware that ActiveX controls are supported only by Internet Explorer...and that IE is soon to be replaced by the Microsoft Edge browser that doesn't not support ActiveX controls. Thus, it might be better to focus on cross-browser solutions rather than proprietary ones.)

Hope this helps...

-- Lance

The ActiveXObject can accept any file type registered from the HKEY_CLASSES_ROOT Registry Key wich are essentially Program Ids, Class IDs and Interface keys. You can even add your own extensions.

For further information you can check the ActiveXObject MSDN Documentation and HKEY_CLASSES_ROOT Key documentation.

You can use Nirsoft's ActiveX Helper which shows a list of registered ActiveX ponents on your system. Anything with a value in the ProgID column can be passed into new ActiveXObject (with or without the version number):

var wdApp = new ActiveXObject('Word.Application.14');
var wdApp2 = new ActiveXObject('Word.Application');
发布评论

评论列表(0)

  1. 暂无评论