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

chapter05 : location 본문

WEB.JS/07.BOM_JS

chapter05 : location

GAWON 2023. 5. 22. 09:17
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">

```
//페이지 이동 수단 (javascript)
//location.href = '<http://www.google.com>';    //(꼭 알아두세요 많이 쓴대요)

function winGo1(){
	location.assign = ('<http://www.google.com>');
}
function winGo2(){
	location.replace = ('<http://www.google.com>');
}

```

</script>
</head>
<body>
<button onclick="winGo1()">히스토리 남기고 이동</button>
<button onclick="winGo2()">히스토리 남기고 않고 이동</button>
</body>
</html>

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

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