WON.dev
chapter03 : window객체 본문
<!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 |