본문 바로가기

Javascript

(Javascript) Style 속성 값을 가져올 수 없다? getComputedStyle() 메소드를 사용하자

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

window.getComputedStyle

Style 속성 값을 가져올 수 없다? getComputedStyle() 메소드를 사용하자

 

http://sean86.tistory.com/6

 

var style = window.getComputedStyle(process, null);

=======

document.getElementById("btn1").onclick = onClick

 

 

<script>

window.onload = function () {

if (!window.getComputedStyle) {

window.getComputedStyle = function(element) {

return element.currentStyle;

}

}

}

</script>