currentStyle object (Object/JScript)

An object that represents the cascaded format and style of its parent object.

Availability:

JScript - 5.0
Internet Explorer - 5.0
Inherits from:style object
JavaScript syntax:IEmyCurrentStyle = myElement.currentStyle
Object methods:getAttribute(), getExpression(), removeExpression(), setAttribute(), setExpression()

Because the style values are cascaded from style sheet to style sheet and may include some inline styles as well as some explicit styles, objects need to maintain a current style value that is the result of all the inheritances applied on top of one another.

In addition they maintain a runtime style that reflects dynamic changes as well. The runtime style is based on the current style in the first place.

This represents the cascaded format and style of its parent object.

The properties belonging to this object correspond closely to those of the style object and so there is little point in discussing them again here. Refer to the style object property descriptions for details of the various properties.

See also:Element.currentStyle, Element.runtimeStyle, runtimeStyle object, style object (2)

MethodJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
getAttribute() n/a5.0 5.0 n/a5.0 5.0 n/a n/a n/a n/a n/a n/a-
getExpression() n/a5.0 5.0 n/a5.0 5.0 n/a n/a n/a n/a n/a n/a-
removeExpression() n/a5.0 5.0 n/a5.0 5.0 n/a n/a n/a n/a n/a n/a-
setAttribute() n/a5.0 5.0 n/a5.0 5.0 n/a n/a n/a n/a n/a n/a-
setExpression() n/a5.0 5.0 n/a5.0 5.0 n/a n/a n/a n/a n/a n/a-