-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdiwali.html
42 lines (26 loc) · 950 Bytes
/
diwali.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
39
40
41
42
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diwali</title>
</head>
<body>
<script>
getWish();
function getWish() {
fetch("https://iamsonukushwaha.github.io/diwali-wishes/db.json")
.then(function (response) {
return response.json();
})
.then(function (data) {
data.forEach(wish => {
let p = document.createElement('p');
p.innerHTML = `<h1>${wish.wish} <br><br></h1>`;
document.body.appendChild(p);
});
});
}
</script>
</body>
</html>