Notice
Recent Posts
Recent Comments
Link
«   2024/06   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

chapter02 : window객체 본문

WEB.JS/07.BOM_JS

chapter02 : window객체

GAWON 2023. 5. 22. 09:16
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
//1. 전역 객체 선언
var newWin;

```
//2.창 열기
function winOpen() {
	var feature = "width=400, height=300, top=100, left=100,";
	feature += "menuber=yes, location=yes , scrollbars=yes, status=yes, resizable=yes";

	newWin = window.open("index.html", "" ,feature);
}

//3.창 닫기
function winClose() {
	newWin.close();
}

```

</script>
</head>
<body>
<button onclick="winOpen()">창 열기</button>
<button onclick="winClose()">창 닫기</button>
</body>
</html>

'WEB.JS > 07.BOM_JS' 카테고리의 다른 글

chapter05 : location  (0) 2023.05.22
chapter04 : history  (0) 2023.05.22
chapter03 : window객체  (0) 2023.05.22
chapter01 : window객체  (0) 2023.05.22