새창 열기
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>암호확인 </title>
<script type="text/javascript">
window.onload = function opener(){
document.getElementById("new").onclick = function(){
newWindow = open("","빈창");
}
document.getElementById("close").onclick = function(){
if(newWindow.closed==false){
newWindow.close();
}else{
alert("새창이 없습니다.");
}
}
}
</script>
</head>
<body>
<form action="">
<input id="new" type="button" value="새창열기" onclick="opener()">
<input id="close" type="button" value="새창닫기" onclick="opener()">
</form>
</body>
</html>