classes 문서 안에 정의된 모든 CSS 클래스들의 정보를 제공 모두지원
defaultsStatus 웹 브라우저의 상태줄의 초기 입력값을 설정 모두지원
frames 윈도우에 사용된 프레임의 배열 정보를 제공 모두지원
innerHeight 웹 브라우저의 높이를 설정 넷스케이프에서 지원
innerWidth 웹 브라우저의 너비를 설정 넷스케이프에서 지원
opener open()메소드로 윈도우를 연 문서를 선택한다 모두지원
outerHeight 웹 브라우저의 높이를 설정 넷스케이프에서 지원
outerWidth 웹 브라우저의 너비를 설정 넷스케이프에서 지원
pageXOffset 윈도우 왼쪽 상단에서 우측으로 떨어진 거리를 설정 넷스케이프에서 지원
pageYOffset 윈도우 왼쪽 상단에서 아래로 떨어진 거리를 설정 넷스케이프에서 지원
parent 계층 구조가 생길 때 상위 window 객체를 설정 모두지원
self 현재 열려 있는 윈도우 창을 설정 모두지원
status 웹 브라우저의 상태줄을 선택 모두지원
top 계층 구조가 생길 때 최 상위 window객체를 선택 모두지원
onblur 웹 브라우저에서 커서가 사라졌을 경우
ondragdrop 웹 브라우저에서 객체를 드래그했을 경우
onerror 웹 브라우저에서 문서를 읽던 중 에러가 발생했을 경우
onfocus 웹 브라우저에서 커서가 있을 경우
onload 문서를 읽었을 경우
onmove 윈도우를 움직였을 경우
onresize 윈도우의 창 크기가 바뀌었을 경우
onunload 웹 브라우저에서 열린 문서에서 떠났을 경우
사용예) 상태줄에 "안녕하세요" 메세지 나타나게 하기
<head>
<title>Status</title>
<script language="JavaScript">
<!--
window.status="안녕하세요."
//-->
</script>
</head>
사용예) status와 defaultStatus 속성을 사용하여 메세지 나타내기
<head>
<title>샤인</title>
<script language="JavaScript">
<!--
window.defaultStatus="[샤인] 홈페이지입니다."
//-->
</script>
</head> <body bgcolor="#0050C8" link="silver" vlink="silver" alink="silver"
leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
<p> </p><p> </p><br>
<table cellpadding="0" cellspacing="0" width="700">
<tr>
<td width="372">
<p><img src="shine.gif" border="0"
onmouseover="window.status='[샤인]의 명 장면'">
</p>
</td>
<td width="372" valign="bottom">
<font size="2">
<p align="right">
<a href="a.htm">[Shine]의스토리</a>
</p>
<p align="right">
<a href="b.htm">[Shine]의배경 배경 음악</a>
</p>
<p align="right">
<a href="c.htm">[Shine]의스크린 샷</a>
</p>
<br><br><br>
</font>
</td>
</tr>
</table>
<p align="right"><font size="2"> </font></p>
</body>
window.open("a","b","c") -
a: 열리게 할 문서의 파일 이름
b: 열리게 할 문서의 창 이름
c: 새롭게 열릴 창의 속성
toolbar yes/no 툴바 메뉴를 보이게 할 지를 설정
location yes/no 주소 표시줄을 보이게 할 지를 설정
directories yes/no 연결 표시줄을 보이게 할 지를 설정
status yes/no 상태 표시줄을 보이게 할 지를 설정
menubar yes/no 메뉴를 보이게 할 지를 설정
scrollbars yes/no 스크롤 바를 보이게 할 지를 설정
resizable yes/no 창 크기 조절을 허용할 지를 설정
copyhistory yes/no 히스토리 정보를 저장할 지를 설정
width 픽셀 창의 가로 길이를 설정
height 픽셀 창의 세로 길이를 설정
사용예) 윈도우 창 열기
<body background="back4.jpg">
<br><br><br><br><br><br>
<p style="text-align: center;"><img src="logo.gif" width="364" height="78" border="0"></p>
<br><br><br><br><br>
<p style="color: white; text-align: center; font-weight: bold;">
| movie | animation | music | guest book |
</p>
</body>
위의 홈페이지 <head> 태그 사이에 다음 내용을 입력
<head>
<title>lets go</title>
<script language="JavaScript">
<!--
window.open("news.htm","","")
//-->
</script>
</head>
다시 open() 메소드에 resizable 속성을 사용하여 창 크기를 조절할 수 있도록 내용을 수정
window.open("news.htm","","resizable=yes")
다시 open() 메소드에 toolbar 속성을 사용하여 표준 단추 메뉴가 보이도록 설정
window.open("news.htm","","resizable=yes,toolbar=yes")
다시 open() 메소드에 width와 height 속성을 사용하여 창 크기를 조절
window.open("news.htm","","resizable=yes,toolbar=yes,width=400,height=400")
(사용예)
news.htm 문서를 연 <input> 태그 안에 단추를 클릭하면 창을 닫아 주도록 내용을 입력
<input type="submit" value="창 닫 기" onclick="window.close()">
윈도우 창 열고 닫기
아래의 html 소스를 복사하여 붙여서 문서 내용을 확인한다.
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" background="beda.gif">
<p align="left">
<img src="logo_shop.gif" width="738" height="204" border="0">
</p>
<table cellpadding="0" cellspacing="2" width="500">
<tr>
<td width="267" rowspan="2">
<p align="right">
<img src="cm.gif" width="145" height="149" border="0">
<br></p>
</td>
<td width="227" height="15" bgcolor="navy">
<p align="center">
<font color="white">video camera</font>
</td>
</tr>
<tr>
<td width="227" height="75">
<p><FONT face="굴림체" color="silver" size="2">
●2.5인치 액정 모니터<br>
●고화질 컬러뷰파인더<br> ●재생 줌 기능<br>
●장시간 쵤용 가능</font><font color="white" size="2"><br></font>
<p align="center">
<input type="submit" value=" 그 림 확 대 ">
<input type="submit" value=" 창 닫 기 ">
<font color="white" size="2"> </font></p>
</td>
</tr>
<tr>
<td width="496" colspan="2">
<p align="right"> </p>
</td>
</tr>
</table>
<p align="left"> </p>
</body>
다음 내용을 <head> 태그 사이에 입력한다
<head>
<title>shopping mall</title>
<script language="JavaScript">
<!--
function mkwin()
{
camwin=window.open("cam.htm","","toolbar=no, width=400, height=400")
}
function closewin()
{
camwin.close()
}
//-->
</script>
</head>
다음 내용을 <input>에 추가 - onclick="mkwin()" / onclick="closewin()"
<input type="submit" value=" 그 림 확 대 " onclick="mkwin()">
<input type="submit" value=" 창 닫 기 " onclick="closewin()">