Easy Tutorial
❮ Met Textarea Select Jsref Tostring ❯

CSSStyleDeclaration removeProperty() Method

CSS CSSStyleDeclaration

Example

Remove the color property:

var declaration = document.styleSheets[0].cssRules[0].style;
var removedvalue = declaration.removeProperty("color");
alert(removedvalue);

Definition and Usage

The removeProperty() method is used to remove a specified CSS style property.


Browser Support

Method Chrome IE Firefox Safari Opera
removeProperty() Yes 9.0 Yes Yes Yes

Syntax

object.removeProperty(propertyname)

Parameter Values

Parameter Description
propertyname Required. A string representing the name of the property to be removed.

Technical Details

DOM Version: CSS Object Model
Return Value: String, the name of the removed property.
--- ---

CSS CSSStyleDeclaration

❮ Met Textarea Select Jsref Tostring ❯