window.open(옵션설명)
②.height : 창 세로길이 지정 [no,yes(생김)]
③.toolbar : 단축도구창 유무지정 [no,yes(생김)]
④.menubar : 메뉴창 유무지정 [no,yes(생김)]
⑤.location : 주소창 유무지정 [no,yes(생김)]
⑦.scollbars : 스크롤바 지정 [no,yes(생김)]
⑧.status : 아래 상태바창 유무지정 [no,yes(생김)]
⑨.resizable : 창변형 유무지정 [no,yes(생김)]
⑩.fullscreen : 전체화면 유무지정 [no,yes(생김]
⑪.channelmode=yes : 앞&뒤로,창최소화.닫기등을 설정(F11번 키랑 같음)
⑫.left=0,top=0 : 창을 고정시킨다.왼쪽 구석에 고정
window.open(지금 글쓴곳이 옵션이 들어 가는곳입니다.원하는 옵션을 추가해서 사용하세요.)
x/////////////////////////////////////////////////////////
<HTML>
<HEAD>
<TITLE> FlashBOY.biz </TITLE>
<script language="javascript">
/*
window.open(url:String, name:String, properties:String)
open 함수는 반드시 3개의 매개변수가 있고, 매개변수 순서는 지겨야 함.
name은 팝업창의 이름, 주로 프레임 문서의 Target으로 사용
name은 사용하지 않으려면 " " 만 표시해줍니다. 반드시 표시해야 함.
*/
function win() {
window.open("http://www.AspBoy.net", "", "");
}
function menu_win() {
window.open("http://www.AspBoy.net", "", "menubar=1");
}
/*
function full_win() {
window.open("http://www.AspBoy.net", "", "fullscreen");
}
*/
function channel_win() {
window.open("http://www.AspBoy.net", "", "channelmode");
}
function toolbar_win() {
window.open("http://www.AspBoy.net", "", "width=400, height=300, toolbar=0");
}
function status_win() {
window.open("http://www.AspBoy.net", "", "width=400, height=300, status=1");
}
function popup_win1() {
window.open("http://www.AspBoy.net", "", "width=400, height=300");
}
function popup_win2() {
window.open("http://www.AspBoy.net", "", "width=400, height=300, left=500, top=400");
}
function popup_win3() {
window.open("http://www.AspBoy.net", "", "width=400, height=300, left=100, scrollbars=1");
}
function popup_win4() {
window.open("http://www.AspBoy.net", "", "width=400, height=300, left=100, location=1");
}
</script>
</HEAD>
<BODY>
<input type="button" value="속성 지정하지 않은 기본 창" onClick="win()"><br>
<input type="button" value="메뉴바 없는 팝업" onClick="menu_win()"><br>
<input type="button" value="채널모드 팝업" onClick="channel_win()"><br>
<input type="button" value="툴바 없는 팝업" onClick="toolbar_win()"><br>
<input type="button" value="상태표시바 있는 팝업" onClick="status_win()"><br>
<input type="button" value="크기 width400 height300 팝업창" onClick="popup_win1()"><br>
<input type="button" value="위치 left=500, top=400 팝업창" onClick="popup_win2()"><br>
<input type="button" value="스크롤바 있는 팝업" onClick="popup_win3()"><br>
<input type="button" value="주소 입력 표시줄 있는 팝업" onClick="popup_win4()"><br>
</BODY>
</HTML>
'JavaScript' 카테고리의 다른 글
[javascript] Define Regular Expression 정규표현식 (0) | 2010.01.29 |
---|---|
[javascript] 웹 애플리케이션 10대 위협 대응 (0) | 2010.01.27 |
[javascript] e-mail체크 (0) | 2010.01.11 |
[javascript] 모달다이얼로그 열기 , 닫기 (0) | 2010.01.05 |
[javascript] radio 버튼에 따른 처리 (2) | 2009.12.27 |