diff options
Diffstat (limited to 'files/ja/web/api/cssstyledeclaration/removeproperty/index.html')
| -rw-r--r-- | files/ja/web/api/cssstyledeclaration/removeproperty/index.html | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/files/ja/web/api/cssstyledeclaration/removeproperty/index.html b/files/ja/web/api/cssstyledeclaration/removeproperty/index.html new file mode 100644 index 0000000000..a1a2600d10 --- /dev/null +++ b/files/ja/web/api/cssstyledeclaration/removeproperty/index.html @@ -0,0 +1,53 @@ +--- +title: CSSStyleDeclaration.removeProperty() +slug: Web/API/CSSStyleDeclaration/removeProperty +tags: +- API +- CSSOM +- Method +- Reference +browser-compat: api.CSSStyleDeclaration.removeProperty +translation_of: Web/API/CSSStyleDeclaration/removeProperty +--- +<p>{{ APIRef("CSSOM") }}</p> + +<p><strong><code>CSSStyleDeclaration.removeProperty()</code></strong> メソッドインターフェイスは、 CSS スタイル宣言オブジェクトからプロパティを削除します。</p> + +<h2 id="Syntax">構文</h2> + +<pre + class="brush: js">var <em>oldValue</em> = <em>style</em>.removeProperty(<em>property</em>);</pre> + +<h3 id="Parameters">引数</h3> + +<ul> + <li><em><code>property</code></em> は {{domxref('DOMString')}} で、削除するプロパティ名を表します。なお、複数語からなるプロパティ名はハイフン区切りであって、キャメルケースではありません。</li> +</ul> + +<h3 id="Return_value">返値</h3> + +<ul> + <li><code><em>oldValue</em></code> は {{domxref('DOMString')}} で、削除される前の CSS プロパティの値と等しいものです。</li> +</ul> + +<h3 id="Exceptions">例外</h3> + +<ul> + <li>{{domxref('DOMException')}} NO_MODIFICATION_ALLOWED_ERR: プロパティまたは宣言ブロックが読取専用の場合。</li> +</ul> + +<h2 id="Example">例</h2> + +<p>次の JavaScript コードは、 CSS の <code>background-color</code> プロパティをセレクター規則から削除します。</p> + +<pre class="brush: js">var declaration = document.styleSheets[0].rules[0].style; +var oldValue = declaration.removeProperty('background-color'); +</pre> + +<h2 id="Specifications">仕様書</h2> + +{{Specifications}} + +<h2 id="Browser_compatibility">ブラウザーの互換性</h2> + +<p>{{Compat}}</p> |
