CSSStyleDeclaration getPropertyValue ()メソッド
❮CSSStyleDeclarationオブジェクト
例
colorプロパティの値を返します。
var declaration = document.styleSheets[0].cssRules[0].style;
var
propvalue = declaration.getPropertyValue("color");
alert(propvalue);
定義と使用法
getPropertyValue()メソッドは、指定されたCSSプロパティの値を返します。
ブラウザのサポート
Method |
|
|
|
|
|
getPropertyValue() |
Yes |
9.0 |
Yes |
Yes |
Yes |
構文
object.getPropertyValue(propertyname)
パラメータ値
Parameter |
Description |
propertyname |
Required. A String representing the name of the property to check
|
技術的な詳細
DOMバージョン: |
CSSオブジェクトモデル |
戻り値: |
プロパティの値を表す文字列 |
❮CSSStyleDeclarationオブジェクト