msdn上有一个调用ActiveXObject的例子:
var ExcelSheet;
ExcelApp = new ActiveXObject("Excel.Application");
ExcelSheet = new ActiveXObject("Excel.Sheet");
但是找不到调用自己写的*.ocx的例子,不知道能否实现?那位高手能给个例子,谢谢。
...全文
887打赏收藏
请问脚本可以调用自己写的activx么(不通过ie,在本地通过wscript运行)
msdn上有一个调用ActiveXObject的例子: var ExcelSheet; ExcelApp = new ActiveXObject("Excel.Application"); ExcelSheet = new ActiveXObject("Excel.Sheet"); 但是找不到调用自己写的*.ocx的例子,不知道能否实现?那位高手能给个例子,谢谢。
http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/vccore/html/_core_upgrading_an_existing_activex_control_to_be_used_on_the_internet.asp
在 Web 页上显示控件
以下是一个关于在 Web 页上插入控件的对象标记和属性的示例。
Description
Enables and returns a reference to an Automation object.
Syntax
var newObject = new ActiveXObject(class)
The class argument uses the syntax servername.typename and has these parts:
Part Description
servername The name of the application providing the object.
typename The type or class of the object to create.
Remarks
Automation servers provide at least one type of object. For example, a word-processing application may provide an application object, a document object, and a toolbar object.
To create an Automation object, assign the new ActiveXObject to an object variable:
var ExcelSheet;
ExcelSheet = new ActiveXObject("Excel.Sheet");
————————————————————————————————————————————
Automation object
An object that is exposed to other applications or programming tools through Automation interfaces.