Retrieves whether the specified component is available.
dhtml语法
bInstalled = clientCaps.isComponentInstalled(sID, sIDType [, sMinVersion])
Parameters
sID |
Required.
Stringthat specifies any of the component identifiers listed in the Detectable Components in Internet Explorer document. |
sIDType |
Required.
Stringthat specifies the case-insensitive type of the identifier specified in sID, or the following value: componentid | Active Setup identifier of the component. |
|
sMinVersion |
Optional.
Stringthat specifies the version number of the component. |
Return Value
Returns one of the following values:
true | The component is installed and its version number is greater than or equal to the specified sMinVersion. |
false | The component is not installed or its version number is less than the specified sMinVersion. |
Remarks
Only Microsoft® Internet Explorer components are detected by this method. If a component identifier of a third-party component is specified, the method returns false.
DHTML代码范例
This example uses the isComponentInstalled method to determine whether the Microsoft virtual machine is installed.
<HTML xmlns:IE>
<HEAD>
<STYLE>
@media all {
IE\:clientCaps {behavior:url(#default#clientcaps)}
}
</STYLE>
</HEAD>
<BODY>
<IE:clientCaps ID="oClientCaps" />
<SCRIPT>
bMSvmAvailable = oClientCaps.isComponentInstalled("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}",
"ComponentID");
</SCRIPT>
:
</BODY>
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

是否符合公共标准
There is no public standard that applies to this method.
Applies To
更多语法参考
about client capabilities, using dhtml behaviors, compareversions, getComponentVersion