Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
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 31
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

chapter03 : window객체 본문

WEB.JS/07.BOM_JS

chapter03 : window객체

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

```
//onload : <body> 태그 확인 후에 처리 (window 생략 가능)
window.onload = function(){
// id가 welcome인 요소에 "환영합니다" 글자 삽입                                (꼭 알아두세요!!!)
document.getElementById("welcome").innerHTML = "환영합니다";
// document.querySelector("#welcome");
}

```

</script>
</head>
<body>
<h1 id="welcome"></h1>
</body>
</html>

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

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