javascript STYLE currentStyle
@March 15, 2008, 1:22 a.m.
currentStyle | Firefox/Netscape/NN n/a IE 5 Chrome/Safari/DOM n/a |
Read-only | |
Returns a style object with properties that reflect the effective values being applied to the element. This property takes into account style sheet rules defined in a style element, imported from external style sheet files, and inline style attributes. Because the style property reflects only inline style attributes, the currentStyle property is more valuable for reading initial values after a document loads. To modify style attributes, you can use the element's style object properties. For similar capabilities in Netscape 6, see the window.getComputedStyle( ) method. |
|
Example | |
var currSize = document.getElementById("elementID").currentStyle.fontSize;
|
|
Value | |
style object reference. |
|
Default | |
The effective style object. |
Permanent URL:
http://javascript.gakaa.com/style-currentstyle.aspx
Powered by Linode.