검색을하다보니 quirksmode의 Bug Report에 올라와 있더군요.
Problem
다음과 같은 html코드가 있다고 가정을 하구요.


Solution
IE인 경우는 분기하여 element.style.setAttribute를 사용합니다. 이 때 주의할 점은 속성으로 'cssText'가 name으로 들어가야 한다는 점입니다.

출처 : setAttribute does not work when used with the style attribute
댓글 없음:
댓글 쓰기