- <!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 window_outer(){
- /* 브라우저 크기 출력 => window.outerWidth; window.outerHeight */
- window_screen = window.outerWidth +'*'+window.outerHeight ;
- document.getElementById("window_outer").innerHTML = window_screen;
- }
- //-->
- </script>
- <form name="input_type" id="input_type" method="post" >
- <!-- 예제 박스에선 안됨 => form태그안에 form태그있으면 지워짐~ㅠ.ㅠ -->
- 윈도우 => 브라우저 크기 <br />
- <p id="window_outer" onclick="window_outer();">window객체- 브라우저 크기[클릭]</p>
- </form>
- </div>
- </body>
- </html>
--------------------------------------------------------------------------------------------
위 소스 예제 보기
브라우저의 전체 넓이 반환
브라우저의 전체 높이 반환
윈도우 안의 내용 영역의 넓이 반환(브라우저UI제외)
윈도우 안의 내용 영역의 높이 반환(브라우저UI제외)
원도우 브라우저 크기 출력합니다. => window.print()
window 속성 보기(접어두었습니다.)
출처 & 인용 - http://www.w3schools.com/
'javascript > window()객체' 카테고리의 다른 글
window객체 onload 로딩후 실행 (예제없음) (0) | 2014.02.10 |
---|---|
window객체 focus() 포커스 얻기 (0) | 2014.02.09 |
window객체 btoa() atob() 베이스64[엔코딩 디코딩] (0) | 2014.02.09 |
window객체 setTimeout() clearTimeout() 대기 후 한번만 실행 [실행, 해제] (0) | 2014.02.08 |
window객체 setInterval() clearInterval() 반복 실행 [실행, 해제] (0) | 2014.02.08 |