CSSStyleDeclaration removeProperty () Metode
Contoh
Hapus properti warna:
var declaration = document.styleSheets[0].cssRules[0].style;
var
removedvalue = declaration.removeProperty("color");
alert(removedvalue);
Definisi dan Penggunaan
Metode removeProperty() menghapus properti CSS yang ditentukan dari blok deklarasi CSS.
Dukungan Peramban
Method | |||||
---|---|---|---|---|---|
removeProperty() | Yes | 9.0 | Yes | Yes | Yes |
Sintaksis
object.removeProperty(propertyname)
Nilai Parameter
Parameter | Description |
---|---|
propertyname | Required. A String representing the name of the property to remove |
Detail Teknis
Versi DOM: | Model Objek CSS |
---|---|
Nilai Kembali: | Sebuah String, mewakili nilai lama dari properti yang dihapus |
Objek Deklarasi CSSStyle