/
grade-6.html
44 lines (41 loc) · 1.68 KB
/
grade-6.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
43
44
<!DOCTYPE html>
<html>
<head>
<title>Projects-Grd.6</title>
<div class=topnav>
<a href="index.html" style="text-decoration: none;">Back to Home </a> |
</div>
<link rel="stylesheet" href="style.css">
</head>
<body><br>
<h2>Projects from Grade 6</h2>
<ul>
<li id="meh">Click the button to get a time-based greeting.
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var time = new Date().getHours();
var greeting;
if (time < 12) {
greeting = "Good morning";
} else if (time < 14) {
greeting = "Good day";
} else if (time < 18){
greeting ="Good evening";
} else{
greeting ="Good night";
}
document.getElementById("demo").innerHTML = greeting;
}
</script></li>
<li id="meh">A working calculator using JavaScript, CSS, and HTML<br><a href="https://priyanshudasgupta8.github.io/Calculator/" target="_blank">Calulator</a></li>
<li id="meh">A game called "Snake Game" using mainly JavaScript, and CSS<br><a href="https://priyanshudasgupta8.github.io/Snake-Game/" target="_blank">Snake Game</a></li>
<li id="meh">2 different types of clocks,: analog and digital using mainly JavaScript, and CSS</li>
<ul>
<li id="meh"><a href="https://priyanshudasgupta8.github.io/Digital-Clock/" target="_blank">Digital Clock</a></li>
<li id="meh"><a href="https://priyanshudasgupta8.github.io/Analog-Clock-/" target="_blank">Analog Clock</a></li>
</ul>
</ul>
</body>
</html>