반응형
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script language="JavaScript">
<!--
var win = null;
function pop1(){
if (win != null){
win.close();
}
win = window.open('Noname2.html','popup','width=100, height=100');
}
function pop2(){
try{
if(new_win) {
new_win.close();
}
}catch(e){}
new_win =window.open('Noname2.html','popup','width=100, height=100');
}
-->
</script>
</HEAD>
<BODY>
<input type="button" value="pop1" onclick="pop1();">
<input type="button" value="pop2" onclick="pop2();">
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script language="JavaScript">
<!--
var win = null;
function pop1(){
if (win != null){
win.close();
}
win = window.open('Noname2.html','popup','width=100, height=100');
}
function pop2(){
try{
if(new_win) {
new_win.close();
}
}catch(e){}
new_win =window.open('Noname2.html','popup','width=100, height=100');
}
-->
</script>
</HEAD>
<BODY>
<input type="button" value="pop1" onclick="pop1();">
<input type="button" value="pop2" onclick="pop2();">
</BODY>
</HTML>
반응형
'웹' 카테고리의 다른 글
부모창 존재 여부 (0) | 2010.01.14 |
---|---|
디지털 시계 (0) | 2009.12.15 |
자바스크립트에서 이벤트 생성 (0) | 2009.11.10 |
iframe 높이 자동 리사이즈 (0) | 2009.11.10 |
동적 div 생성 (0) | 2009.10.29 |