● window.open() > SCRIPT

본문 바로가기
사이트 내 전체검색

SCRIPT

● window.open()

페이지 정보

본문

<script>

var win = null;


function show(){

if(win ==  null || win.closed){

win = window.open("","outWin","width=300, height=300");

}else{

alert("멀 그리 눌러 샀노. 팝업 열려 있다.");

}


var textArea = document.getElementById("srcText");

win.document.open();

win.document.write(textArea.value);

win.document.close();

}

</script>

<body>


<h3></h3>

<hr>

textarea 태그 안에 내용을 작성 하시고 [문서 출력]버튼을 눌러보세요.

<br>


<textarea id="srcText" rows=10 cols=50></textarea>

<br>


<button onclick="show()">문서 출력</button>

<button onclick="window.open('aaa.html','','width=400,height=400,left=0,top=0');" style="cursor:pointer;">팝업 클릭1</button>

<button onclick="window.open('bbb.html?id=dancepkt','aaa','width=400,height=400,left=0,top=0');" style="cursor:pointer;">팝업 클릭1</button>


==== tip ==== 

window.open("웹페이지 url","윈도우 이름","윈도우 속성");

추천0 비추천0

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

공지사항
자유게시판
질문답변
1:1문의

 

별명 : 터푸가위
주소 : 부산시 동래구 명장로20번길 90
대표 : 박규태
메일 : dancepkt@******.com

접속자집계

오늘
125
어제
285
최대
10,760
전체
277,731
Copyright © dancePKT . All rights reserved.