HBCMS更多的中文手册参考:

addComponentRequest Method

DHTML文档教程

Adds the specified component to the queue of components to be installed.

dhtml语法

clientCaps.addComponentRequest(sID, sIDType [, sMinVer])

Parameters

sID Required. Stringthat specifies any of the component identifiers listed in the Installable Components in Internet Explorer document.
sIDType Required. Stringthat specifies the case-insensitive type of the identifier specified in sID, or the following value:
componentidActive Setup identifier of the component.
sMinVer Optional. Stringthat specifies the minimum version number of the component to install.

Return Value

No return value.

Remarks

Only Microsoft® Internet Explorer components are specified by this method. Components not supported by Internet Explorer are ignored.

The addComponentRequest method queues a download request for the specified component. Actual download of the component does not occur until a call is made to the docomponentrequest method.

DHTML代码范例

This example uses the addComponentRequest and doComponentRequest methods to install the Internet Explorer Data Binding component, if the component does not already exist in the user's system.

<HTML xmlns:IE>
<HEAD>
<STYLE>
@media all {
IE\:clientCaps {behavior:url(#default#clientCaps)}
}
</STYLE>
<SCRIPT>
function window.onload()
{
var bDBAvailable  = false;
var sDBVersion = '';
var sDBID = "{9381D8F2-0288-11D0-9501-00AA00B911A5}";
bDBAvailable = oClientCaps.isComponentInstalled(sDBID,"componentid");
// if data binding is unavailable, install it
if (!bDBAvailable)
{
oClientCaps.addComponentRequest(sDBID, "componentid");
bDBAvailable = oClientCaps.doComponentRequest();
}
:
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
:
<IE:clientCaps ID="oClientCaps" />
:
</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

clientCaps

更多语法参考

clientcaps, using dhtml behaviors, compareversions, docomponentrequest, isComponentInstalled