아래 그림과 같이 :
함수 getStyle (노드, 속성) {if (node.style [property]) {return node.style [속성]; } else if (node.currentStyle) {return node.currentStyle [속성]; } else if (document.defaultView && document.defaultView.getComputedStyle) {var style = document.defaultView.getComputedStyle (Node, null); return style.getPropertyValue (속성); } return null; }위의 기사 js는 페이지에서 참조 된 CSS 스타일 시트에서 속성 값 메소드 (권장)를 얻는 것은 내가 공유하는 모든 내용입니다. 나는 당신이 당신에게 참조를 줄 수 있기를 바랍니다. 그리고 당신이 wulin.com을 더 지원할 수 있기를 바랍니다.