Skip to content

Commit f388288

Browse files
bom and dom
Signed-off-by: Arnav Gupta <[email protected]>
1 parent 1fd1a56 commit f388288

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

Lecture06/bomdom/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<title>Document</title>
8+
<script defer src="script.js"></script>
9+
10+
</head>
11+
<body>
12+
13+
<input id="name">
14+
<button id="greet">Greet</button>
15+
16+
</body>
17+
</html>

Lecture06/bomdom/script.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
window.onload = function() {
2+
3+
let x = document.getElementById('name')
4+
let y = document.getElementById('greet')
5+
6+
y.onclick = function() {
7+
window.alert('Hello ' + x.value)
8+
}
9+
}

Lecture06/jsbasics/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<meta http-equiv="X-UA-Compatible" content="ie=edge">
77
<title>Document</title>
8-
<script src="functions.js"></script>
8+
<script src="myfile.js"></script>
99
</head>
1010
<body>
1111

12+
<h1>my page</h1>
1213

1314

1415
</body>

0 commit comments

Comments
 (0)