-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresult.html
72 lines (64 loc) · 1.64 KB
/
result.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Result Page</title>
<style>
*{
font-size: 40px;
font-family: Arial, Helvetica, sans-serif;
}
body{
background-color: #EDEADE;
}
h2{
border: 2px solid black;
width: 700px;
border-radius: 20px;
}
h2:hover {
border-color: rgb(12, 75, 96);
background-color: lightblue;
}
#nav{
background-color: black;
height:50px;
}
#nav a{
color: white;
text-decoration: none;
margin: 20%;
}
#nav a:hover {
border-bottom: 2px solid;
}
</style>
</head>
<body>
<center>
<div id="nav">
<a href="index.html">Home</a>
<a href="aboutUs.html">About Us</a>
</div>
<h1>Result</h1>
<h2 id="msg"></h2>
</center>
<script>
let msg=document.getElementById("msg");
let res=localStorage.getItem("res");
if(res==null)
{
msg.innerHTML="You're Trying To Tresspass";
function goback()
{
window.location.href="index.html";
}
setTimeout(goback,5000);
}
else {
msg.innerHTML="Square is "+parseFloat(res).toFixed(2);
}
</script>
</body>
</html>