CSS2 Document documentMode Property

황제낙엽 2011.10.04 11:49 조회 수 : 906

sitelink1  
sitelink2  
sitelink3 http://1 
sitelink4 http://ko 
extra_vars5 http://www.w3schools.com/jsref/prop_doc_documentmode.asp 
extra_vars6 sitelink1 

Document documentMode Property


Definition and Usage


documentMode property는 현재 document를 만들기 위해 브라우저에 의해 사용되어 지는 mode를 반환한다.


IE8은 !DOCTYPE 또는 HTML elements의 presence를 바탕으로 여러 가지 mode로 page를 만들 수 있다.


이 property는 다음 값 중 하나를 반환한다.


? 5 - 페이지가 IE5 mode로 표시된다.

? 7 - 페이지가 IE7 mode로 표시된다.

? 8 - 페이지가 IE8 mode로 표시된다.


Note : !DOCTYPE가 명시되지 않는다면, IE8은 페이지를 IE5 mode로 만든다!


Syntax


document.documentMode


Browser Support


untitled.png



documentMode는 오직 IE8에만 적용된다.


Example


현재 document를 만들기 위해 브라우저에 의해 사용되어 지는 mode를 반환한다.


<html>

<body>

This document is displayed in:

<script type="text/javascript">

document.write(document.documentMode);

</script>

</body>

</html>