Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Sets the value of the specified attribute.
![]() |
Syntax
HRESULT retVal = object.setAttribute(strAttributeName, AttributeValue);
Parameters
strAttributeName [in]
Type: BSTRBSTR that specifies the name of the attribute.
AttributeValue [in]
Type: VARIANTVariant that specifies the string, number, or Boolean to assign to the attribute.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
If the specified attribute is not already present, the IHTMLElement5::setAttribute method adds the attribute to the object and sets the value.
See also
Reference
Conceptual
.png)