Click to return to the Reusing Browser Technology home page    
IHTMLElement2::getElement...     IHTMLElement2::insertAdja...     IHTMLElement2 Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLElement2::getExpression Method


Retrieves the expression for the given property.

Syntax

HRESULT getExpression(
    BSTR sPropertyName,
    VARIANT *pExpression
);

Parameters

sPropertyName
String that specifies the name of the attribute to which pExpression will be added.
pExpression
Address of a VARIANT structure that returns a value representing the expression of the property.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

To remove an expression and replace the property value with the "system default" value, use the form elem.style.removeExpression("color").

To remove an expression and replace the value with a static value, use elem.style.removeExpression("color") followed by elem.style.color = "red".

To remove an expression and replace it with the current value (recalculated value) use temp = elem.style.color, next use elem.style.removeExpression("color"), and then elem.style.color = temp.

See Also

removeExpression, setExpression



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.