Javascript [Electronic resources] : The Definitive Guide (4th Edition)

David Flanagan

نسخه متنی -صفحه : 844/ 573
نمايش فراداده

Availability

DOM Level 2 CSS

Synopsis

String getPropertyValue(String propertyName);

Arguments

propertyName

The name of the CSS attribute whose value is desired.

Returns

The string value of the named CSS attribute, or the empty string if that attribute is not explicitly set in this declaration block.

Description

This method returns the value of the named CSS attribute as a string. Unlike getPropertyCSSValue( ), this method works with shortcut attributes as well as regular attributes. See also the various convenience properties of the CSS2Properties interface.