-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
108 lines (96 loc) · 2.74 KB
/
index.html
File metadata and controls
108 lines (96 loc) · 2.74 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Contact</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body >
<script>
function processGrade() {
var d = new Date();
if(d.getHours() < 12) {
document.getElementById("graderes").innerHTML = "Good morning " + document.getElementById("namefield").value;
}
if((d.getHours() < 19) && (d.getHours() > 11)) {
document.getElementById("graderes").innerHTML = "Good afternoon " + document.getElementById("namefield").value;
}
if(d.getHours() > 18) {
document.getElementById("graderes").innerHTML = "Good night " + document.getElementById("namefield").value;
}
var x = document.getElementById("expectedgrade").value;
var pc = (((x/5)*100) + "%");
switch(x) {
case "0":
document.getElementById("expected").innerHTML = (pc +" "+ " Go home already");
break;
case "1":
document.getElementById("expected").innerHTML = (pc +" " + "Try next time");
break;
case "2":
document.getElementById("expected").innerHTML = (pc +" " + "Pass");
break;
case "3":
document.getElementById("expected").innerHTML = (pc +" "+ "Decent.");
break;
case "4":
document.getElementById("expected").innerHTML = (pc +" "+ "Good");
break;
case "5":
document.getElementById("expected").innerHTML = (pc +" "+ "Excellent");
break;
default:
document.getElementById("expected").innerHTML = (pc +" "+ "what now");
}
}
</script>
<p>Last Modified:</p>
<p id="si"></p>
<script>
var x = document.lastModified;
x = x.toLocaleString('en-GB');
document.getElementById("si").innerHTML = x;
</script>
<div id="header">
<h1><a href="index.html">Salaha Ilyas</a></h1>
<ul id="nav">
<li><a href="home.html">Home</a>
</li>
<li><a href="about.html">About</a>
</li>
<li><a href="contact.html">Contact</a>
</li>
<li><a href="CV.html">CV</a>
</li>
<li><a href="https://www.instagram.com/flowerland800/">Instagram</a>
</li>
</ul>
</div>
<main>
<form>
<p>Enter your name:</p>
<input type="text" name="usname" value="" id="namefield"/>
<p>What grade should you get?</p>
<select name="exgrade" id="expectedgrade">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<input type="button" value="Submit" onclick="processGrade()"/>
</form>
<div id="modsect">
<p id="graderes"></p>
<p id="expected"></p>
</div>
</main>
<img src="leafy.jpg" alt="leafy-image" >
<footer>
<p>
Webpage made by <a href="/" target="_blank">[Salaha Ilyas]</a>
</p>
</footer>
</body>
</html>