-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJavaScript1.html
More file actions
46 lines (44 loc) · 1.26 KB
/
JavaScript1.html
File metadata and controls
46 lines (44 loc) · 1.26 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hi</title>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"
></script>
<style>
.big {
font-size: 100px;
width: 500px;
height: 500px;
background-color: palevioletred;
color: white;
}
button {
width: 50%;
font-size: 100px;
}
</style>
</head>
<body>
<div class="container1"></div>
<hr />
<button class="test btn btn-danger">Click</button>
</body>
<script>
const testButton = document.querySelector(".test");
const container = document.querySelector(".container1");
testButton.addEventListener("click", function () {
container.innerHTML = "메롱ㅠ";
container.classList.add("big");
});
</script>
</html>