English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSSStyleDeclaration removeProperty() Method

 JavaScript CSSStyleDeclaration Object

removeProperty()Method to remove the properties of the CSS style declaration object.

Syntax:

object.removeProperty(property)
var declaration = document.styleSheets[0].rules[0].style;
var oldValue = declaration.removeProperty('color');
document.getElementById("result").innerHTML = oldValue;
Test and see‹/›

Browser Compatibility

All browsers fully support the removeProperty() method:

Method
removeProperty()YesYesYesYesYes

Parameter Value

ParameterDescription
propertyA string representing the name of the property to be deleted

Technical Details

Return Value:A string representing the old value of the deleted property
DOM Version:CSS Object Model

 JavaScript CSSStyleDeclaration Object