styleSheet개체들로 문서에 도입된 모든 스타일쉬트들의 배열변수 컬렉션을 참조한다.
![]() Script | [cVal]=styleSheet.imports |
[oVal]=styleSheet.imports(index) |
도입된 스타일쉬트는 <STYLE>@import</STYLE> 태그에 의하여 문서에 가져온 스타일쉬트를 말한다.
개체 | script | HTML | 규격 | IE |
---|---|---|---|---|
styleSheet | [cVal]=styleSheet.imports | 없음 | 없음 | IE4.0(win16,win32,ce,mac,unix) |
![]() | imports⇒ | ![]() | ⇒ | ![]() ![]() ![]() |
imports 설명을 위한 예제
도입 스타일 적용 |
<style id="cssObj">@import 'exp/samp.css';@import 'exp/sample.css';</style> <script>oObj=document.styleSheets(1).imports;</script><u class="samp">도입 스타일 적용</u> |
![]() | imports⇒ | ![]() | ⇒ | ![]() ![]() ![]() |
![]() | imports⇒ | ![]() | ⇒ | ![]() ![]() ![]() |
![]() | imports⇒ | ![]() | ⇒ | ![]() ![]() ![]() |
imports 컬렉션 예제
<SCRIPT> str='document.styleSheets.length='+document.styleSheets.length+'<BR>' for (i=0;i< document.styleSheets.length;i++){ str+='document.styleSheets[i].owningElement.tagName='+document.styleSheets[i].owningElement.tagName+'<BR>'; for (j=0;j< document.styleSheets(i).imports.length;j++){ str+='도입된 스타일쉬트(document.styleSheets('+i+').imports('+j+').href)는 '; str+='<FONT color=blue>'+document.styleSheets(i).imports(j).href+'</FONT>에 있다.<BR>'; } } document.write(str); </SCRIPT>
![]() | imports | ⇒ | ![]() ![]() |
최종 수정: 06/20/2025 20:50:43 | ![]() All right reserved | 비정상적인 방식으로 프레임없이 페이지에 접속하면 자주 오류가 발생됩니다. 오류가 나면 정상적 접속으로 시도해 보세요. | http://koxo.com/lang/js/object/imports.html |