Remove the color property:
var declaration = document.styleSheets[0].cssRules[0].style;
var removedvalue = declaration.removeProperty("color");
alert(removedvalue);
Try it Yourself »
The removeProperty() method removes the specified CSS property from a CSS declaration block.
Method | |||||
---|---|---|---|---|---|
removeProperty() | Yes | 9.0 | Yes | Yes | Yes |
object.removeProperty(
propertyname)
Parameter | Description |
---|---|
propertyname | Required. A String representing the name of the property to remove |
DOM Version: | CSS Object Model |
---|---|
Return Value: | A String, representing the old value of the removed property |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!