Skip to content
- 교재 예제
- ex10-01.html
- ex10-02.html
- ex10-03.html
- ex10-04.html
- ex10-05.html
- ex10-06.html
- ex10-07.html
- ex10-08.html
- ex10-09.html
- ex10-10.html
- ex10-11.html
- ex10-12.html
- fig10-01.html
- BOM(Browser Object Model) 객체들
- window – 브라우저 윈도우 모양 제어. 새 윈도우 열기/닫기
- navigator – 브라우저에 대한 다양한 정보 제공
- history – 브라우저 윈도우에 로드한 URL 리스트의 히스토리 관리
- location – 브라우저 윈도우에 로드된 HTML 페이지의 URL 관리
- screen – 브라우저가 실행되고 있는 스크린 장치에 대한 정보 제공
- 윈도우 열기
- window.open(URL, sWindowName, sFeature);
- 윈도우 이름(sWindowName)
- _blank : 이름 없는 새 윈도우를 열고, 웹 페이지 로드
- _parent : 현재 윈도우(혹은 프레임)의 부모 윈도우에 웹 페이지 로드
- _self : 현재 윈도우에 웹 페이지 로드
- _top : 브라우저 윈도우에 웹 페이지 로드
- 사용 예
- window.open(“http://www.naver.com”, “”, “”);
- window.open(“sample.html”, “myWin”, “toolbar=yes”);
- window.open(“sample.html”, “_self”);
- window.open(“sample.html”, “_blank”);
- window.open(“http://www.naver.com”, “myWin”, “left=10,top=10,width=300,height=400”);
- window.open(“http://www.naver,com”);
- window.open(“http://www.naver,com”, null, “”);
- window.open(); //빈 창 열기
- window.open(“”); //빈 창 열기
- window.open(“”, “”, “”); //빈 창 열기
- window.open(“”, null, null); //빈 창 열기
- 윈도우 닫기
- window.close();
- let win = window.open(); // 새 윈도우 생성
…
win.close(); // 자신이 만든 윈도우 닫기
- 예제 10-01
error: Content is protected !!