CSSStyleDeclaration removeProperty ()メソッド
例
colorプロパティを削除します。
var declaration = document.styleSheets[0].cssRules[0].style;
var
removedvalue = declaration.removeProperty("color");
alert(removedvalue);
定義と使用法
removeProperty()メソッドは、指定されたCSSプロパティをCSS宣言ブロックから削除します。
ブラウザのサポート
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バージョン: | CSSオブジェクトモデル |
---|---|
戻り値: | 削除されたプロパティの古い値を表す文字列 |
❮CSSStyleDeclarationオブジェクト