-
Notifications
You must be signed in to change notification settings - Fork 0
/
result.html
86 lines (77 loc) · 1.8 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<html>
<head>
<title>Hand Cricket</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
label{
font-size:32px;
font-weight:bold;
color:White;
}
.buttonnext {
border-radius: 4px;
background-color: white;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 16px;
padding: 10px;
width: 200px;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
}
.buttonnext span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
color: black;
}
.buttonnext span:after {
content: '\00bb';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}
.buttonnext:hover span {
padding-right: 25px;
}
.buttonnext:hover span:after {
opacity: 1;
right: 0;
}
</style>
</head>
<body style="background-color:686B76;">
<center>
<br><br><br><br>
<label id = "myscore"></label>
<br><br><br><br>
<label id = "sysscore"></label>
<br><br><br><br>
<label id = "result"></label>
<br><br><br><br>
<a href="toss.html">
<button class="buttonnext" id="next" onclick="nextactivity()" ><span><b>Play Again</b> </span></button>
</a>
<script>
document.getElementById('myscore').innerHTML="Your Score is "+localStorage.myscore;
document.getElementById('sysscore').innerHTML="System Score is "+localStorage.sysscore;
if(Number(localStorage.sysscore) > Number(localStorage.myscore)){
document.body.style.backgroundColor ='#F3321B';
document.getElementById('result').innerHTML="Lost";
}
else if(Number(localStorage.sysscore) == Number(localStorage.myscore)){
document.getElementById('result').innerHTML="Draw";
}
else{
document.body.style.backgroundColor ='#97F51E';
document.getElementById('result').innerHTML="Won";
}
</script>
</center>
</body>
</html>