CSSStyleDeclaration removeProperty() method
Example
Remove the color property:
var
declaration
=
document
.
styleSheets
[
0
]
.
cssRules
[
0
]
.
style
;
var
removedvalue
=
declaration
.
removeProperty
(
"
color
"
)
;
alert
(
removedvalue
)
;
Try it »
Definition and usage
The removeProperty() method is used to remove the specified CSS style property.
Browser support
| Method | |||||
|---|---|---|---|---|---|
| removeProperty() | Yes | 9.0 | Yes | Yes | Yes |
Syntax
object.removeProperty(propertyname)
Attribute values
| Parameters | Description |
|---|---|
| propertyname | Required. A string representing the name of the property to remove. |
Technical Details
| DOM version: | CSS Object Model |
|---|---|
| Return value: | A string that is the name of the removed property. |
CSS CSSStyleDeclaration