-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path09-dom.html
38 lines (32 loc) · 897 Bytes
/
09-dom.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>DOM</title>
</head>
<body>
<button>First Button</button>
<button class="js-button">Second Button</button>
<!-- DOM = Document Object Model-->
<script>
console.log(document.querySelector('button').innerHTML);
document.querySelector('button')
.innerHTML = 'Changed';
const buttonElement = document.querySelector('.js-button');
console.log(buttonElement);
/*
console.log(document.title)
document.title = 'Changed';
console.log(document.body)
console.log(typeof document.body)
console.log(document.body.innerHTML)
document.body.innerHTML = '<button>Good Jib!</button>'
console.log(document.body.innerHTML)
*/
/*
document.body.innerHTML = 'hello';
document.title = 'Good Job!'
*/
</script>
</body>
</html>