- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- 현재 작성하고 있는 파일은 UTF-8 DOS파일입니다.-->
- <html xmlns="http://www.w3.org/1999/xhtml" lang="ko">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- </head>
- <body>
- <div id="ex_js_syntax">
- <script type="text/javascript" language="javascript">
- <!--
- function screen_pixelDepth(){
- /* 스크린 방문자의 화면 컬러 해상도(픽셀당 비트) => screen.pixelDepth
- 이미지를 표시하기 위한 컬러 해상도(픽셀당 비트) => screen.colorDepth */
- document.getElementById("screen_pixel").innerHTML = screen.pixelDepth;
- }
- //-->
- </script>
- <form name="input_type" id="input_type" method="post" >
- <!-- 예제 박스에선 안됨 => form태그안에 form태그있으면 지워짐~ㅠ.ㅠ -->
- 스크린 => 해상도 색상 <br />
- <p id="screen_pixel" onclick="screen_pixelDepth();">screen객체 해상도 색상[클릭]</p>
- </form>
- </div>
- </body>
- </html>
--------------------------------------------------------------------------------------------
위 소스 예제 보기
스크린 방문자의 화면 컬러 해상도(픽셀당 비트) => screen.pixelDepth
이미지를 표시하기 위한 컬러 해상도(픽셀당 비트) => screen.colorDepth
출처 & 인용 - http://www.w3schools.com/
'javascript > Screen,history객체' 카테고리의 다른 글
History객체 forward() 다음 페이지 가기 (0) | 2014.02.04 |
---|---|
History객체 back() 이전 페이지 가기 (0) | 2014.02.04 |
History객체 length 사용자가 방문한 URL 수 (0) | 2014.02.04 |
screen객체 height 스크린 해상도 높이 (0) | 2014.02.04 |
screen객체 width 스크린 해상도 넓이 (0) | 2014.02.04 |