CSSStyleDeclaration getPropertyValue () Metoda
❮ Obiekt CSSStyleDeclaration
Przykład
Zwróć wartość właściwości koloru:
var declaration = document.styleSheets[0].cssRules[0].style;
var
propvalue = declaration.getPropertyValue("color");
alert(propvalue);
Definicja i użycie
Metoda getPropertyValue() zwraca wartość określonej właściwości CSS.
Obsługa przeglądarki
Method |
|
|
|
|
|
getPropertyValue() |
Yes |
9.0 |
Yes |
Yes |
Yes |
Składnia
object.getPropertyValue(propertyname)
Wartości parametrów
Parameter |
Description |
propertyname |
Required. A String representing the name of the property to check
|
Szczegóły techniczne
Wersja DOM: |
Model obiektowy CSS |
Wartość zwrotu: |
String, reprezentujący wartość właściwości |
❮ Obiekt CSSStyleDeclaration