1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <!-- 현재 작성하고 있는 파일은 UTF-8 DOS파일입니다.-->
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="ko">
  4.   <head>
  5.     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6.   </head>
  7.   <body>
  8.     <div id="ex_js_syntax">
  9.       <script type="text/javascript" language="javascript">
  10.       <!--
  11.       function window_open_resize(){
  12.        /* 윈도우 창 열기 => window.open(); */
  13.        open_resizeby_specs = "width=350, height=200, top=300, left=300";
  14.        open_resizeby_window = window.open("", "open_resizeby_window", open_resizeby_specs, false);
  15.        open_resizeby_window.document.write("<p>open_resizeby_window 창 열음</p>");
  16.        document.getElementById("window_open_resize").innerHTML = "창열기";
  17.       }
  18.       function window_resizeby(){
  19.        /* 윈도우 창 상대적 크기 => window.resizeBy(넓이, 높이); */
  20.        open_resizeby_window.resizeBy(150,100);
  21.        open_resizeby_window.focus();
  22.        document.getElementById("window_resizeby").innerHTML =  "resizeby() 상대적 창 크기[클릭]";
  23.       }
  24.       function window_resizeto(){
  25.        /* 윈도우 창 절대적 크기 => window.resizeTo(넓이, 높이); */
  26.        open_resizeby_window.resizeTo(300,150);
  27.        open_resizeby_window.focus();
  28.        document.getElementById("window_resizeto").innerHTML =  "resizeto() 절대적 창 크기[클릭]";
  29.       }
  30.       //-->
  31.       </script>
  32.       <form name="input_type" id="input_type" method="post" >
  33.       <!-- 예제 박스에선 안됨 => form태그안에 form태그있으면 지워짐~ㅠ.ㅠ -->
  34.         윈도우 => 창 크기 <br />
  35.         <p id="window_open_resize" onclick="window_open_resize();">window객체-메서드 resize()사용할 open()[클릭]</p>
  36.         <p id="window_resizeby" onclick="window_resizeby();">window객체-메서드 resizeby() 상대적 창 크기[클릭]</p>
  37.         <p id="window_resizeto" onclick="window_resizeto();">window객체-메서드 resizeto() 절대적 창 크기[클릭]</p>
  38.       </form>
  39.     </div>
  40.   </body>
  41. </html>

--------------------------------------------------------------------------------------------

위 소스 예제 보기


window.resizeBy()

window.resizeTo()


윈도우 창 상대적 크기 => window.resizeBy(넓이, 높이);

윈도우 창 절대적 크기 => window.resizeTo(넓이, 높이);


window 속성 보기(접어두었습니다.)


출처 & 인용 - http://www.w3schools.com/


:
BLOG main image

공지사항

카테고리

분류 (356)
main (1)
php5 (218)
HTML (36)
javascript (93)
IT 이론과 퍼온정보 (8)
깨작일상 (0)
곧 추가할 내용 (0)
추후 알아볼것들... (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

달력

«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Total :
Today : Yesterday :