CSSStyleDeclaration getPropertyValue () Metode
Objek Deklarasi CSSStyle
Contoh
Kembalikan nilai properti warna:
var declaration = document.styleSheets[0].cssRules[0].style;
var
propvalue = declaration.getPropertyValue("color");
alert(propvalue);
Definisi dan Penggunaan
Metode getPropertyValue() mengembalikan nilai properti CSS yang ditentukan.
Dukungan Peramban
Method |
|
|
|
|
|
getPropertyValue() |
Yes |
9.0 |
Yes |
Yes |
Yes |
Sintaksis
object.getPropertyValue(propertyname)
Nilai Parameter
Parameter |
Description |
propertyname |
Required. A String representing the name of the property to check
|
Detail Teknis
Versi DOM: |
Model Objek CSS |
Nilai Kembali: |
Sebuah String, mewakili nilai properti |
Objek Deklarasi CSSStyle