-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdom.html
More file actions
23 lines (22 loc) · 783 Bytes
/
dom.html
File metadata and controls
23 lines (22 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DOM</title>
</head>
<body>
<button>ok</button>
<button class="js-button">Second</button>
<script>
document.querySelector('button').innerHTML='changed'
console.log(document.querySelector('.js-button'))
console.log(document.querySelector('button').innerHTML)
// console.log(document.title)//current title similaryl for innetthtml
// console.log(document.body) // type=object
// console.log(document.body.innerHTML) // type=object
// document.body.innerHTML='<b>hello</b>'
// document.title="DOM MANIPULATION" // changes title
</script>
</body>
</html>