CSSStyleDeclaration removeProperty () Metoda
Przykład
Usuń właściwość koloru:
var declaration = document.styleSheets[0].cssRules[0].style;
var
removedvalue = declaration.removeProperty("color");
alert(removedvalue);
Definicja i użycie
Metoda removeProperty() usuwa określoną właściwość CSS z bloku deklaracji CSS.
Obsługa przeglądarki
Method | |||||
---|---|---|---|---|---|
removeProperty() | Yes | 9.0 | Yes | Yes | Yes |
Składnia
object.removeProperty(propertyname)
Wartości parametrów
Parameter | Description |
---|---|
propertyname | Required. A String representing the name of the property to remove |
Szczegóły techniczne
Wersja DOM: | Model obiektowy CSS |
---|---|
Wartość zwrotu: | String, reprezentujący starą wartość usuniętej właściwości |
❮ Obiekt CSSStyleDeclaration