Retrieves the expression for the given property.
Syntax
HRESULT getExpression( BSTR sPropertyName, VARIANT *pExpression );
Parameters
- sPropertyName
- String (BSTR) 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, then elem.style.removeExpression("color"), and then elem.style.color = temp.
See Also