English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
JavaScript CSSStyleDeclaration 객체
getPropertyPriority()CSS 스타일 선언서 getPropertyPriority() 메서드
만약 "important"가 반환되면, 우선순위가 설정되었음을 의미합니다. 그렇지 않으면 설정되지 않았습니다.
object.getPropertyPriority(property)
var declaration = document.styleSheets[0].rules[0].style; var isImportant = declaration.getPropertyPriority('color'); document.getElementById("result").innerHTML = isImportant;테스트를 보러 가기‹/›
모든 브라우저에서 getPropertyPriority() 메서드를 완전히 지원합니다:
메서드 | |||||
getPropertyPriority() | 는 | 는 | 는 | 는 | 는 |
파라미터 | 설명 |
---|---|
property | 검사할 속성 이름을 나타내는 문자열 |
반환 값: | 우선순위를 나타내는 문자열, 존재하지 않으면 빈 문자열 |
---|---|
DOM 버전: | CSS 객체 모델 |