728x90
예를 들자면 window로 부터 접근할수 있는 객체들을 알고 싶다, 그런경우는

<script language="JavaScript" type="text/javascript">
    for (i in window){
        document.writeln(i + "<br />");
    }
</script>

물론 i는 그냥 변수로써 다른것으로 바꿔 쓰셔도 상관 없습니다.

이것을 응용하여, document로 접근할 수 있는 객체를 알고 싶으면 window를 document로 바꿔주시면 됩니다. 아주 간편한 방법이죠.
728x90

'Information' 카테고리의 다른 글

동적으로 테이블의 tr 생성 및 삭제  (0) 2007.03.04
iframe 자동 크기지정  (1) 2007.03.03
CSS Cuser Property  (0) 2007.03.03

+ Recent posts