Click to return to the Reusing Browser Technology home page    
IHTMLElement::get_title M...     IHTMLElement::insertAdjac...     IHTMLElement Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLElement::getAttribute Method


Retrieves the value of the given attribute.

Syntax

HRESULT getAttribute(
    BSTR strAttributeName, 
    LONG fFlags,
    VARIANT *AttributeValue
);

Parameters

strAttributeName
String (BSTR) that specifies the name of the attribute to retrieve.
fFlags
Reserved. Long integer value that is set to zero.
AttributeValue
Address of a VARIANT structure that receives a string, number, or Boolean value as defined by the attribute. If the attribute is not present, this method returns NULL.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

If two or more attributes have the same name (differing only in uppercase and lowercase letters) and fFlags is FALSE, this method retrieves values only for the last attribute (the last to be created with this name). All other attributes of the same name are ignored.

See Also

removeAttribute, setAttribute


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.