Export (0) Print
Expand All
0 out of 2 rated this helpful - Rate this topic

getComputedStyle method

Returns a currentStyle object containing the Cascading Style Sheets (CSS) settings that are applied to the specified element or a pseudo-element related to the specified element.

Document Object Model (DOM) Level 2 Style Specification, Section 2.2.1Internet Explorer 9

Syntax

var ppComputedStyle = window.getComputedStyle(varArgIn, bstrPseudoElt);

Parameters

varArgIn [in]

Type: IHTMLDOMNode

The element that contains the desired style settings.

bstrPseudoElt [in]

Type: String

The name of a CSS pseudo-element or a null value.

ppComputedStyle [out, retval]

Type: IHTMLW3CComputedStyle

A currentStyle object that contains the CSS settings applied to the desired object.

The settings in the ppComputedStyle object account for all applicable style rules and represent the final values for the various CSS properties applied to the specified object.

Return value

Type: IHTMLW3CComputedStyle

A currentStyle object that contains the CSS settings applied to the desired object.

The settings in the ppComputedStyle object account for all applicable style rules and represent the final values for the various CSS properties applied to the specified object.

Standards information

Remarks

When the bstrPseudoElt is set to a value other than null, the value is interpreted as a CSS pseudo-element with respect to the object specified in the varArgIn parameter.

See also

window

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.