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 객체