forked from WDI-HK-8/thePunisher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (53 loc) · 1.58 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>The Punisher</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body onload="Punisher();" style="background-color: lightgrey;">
<div class="wrapper" style="text-align: center;">
<div class="container" style="background-color: white; height: 400px; margin-top: 10px;">
<img src="http://www.dsvolition.com/wp-content/uploads/2012/04/jumbo_PunisherLogo-540x303.jpg" style="float: left; height: 60px; margin-top: 10px;">
<h1 style="padding-top: 20px;">The punishment is: </h1>
<div class="well" style="margin: 50px 30px 30px 30px;">
<p id="demo" style="font-size: 20px;"></p>
</div>
<button class="btn btn-success" onclick="Punisher();" type="submit">Random Punishment</button>
</div>
</div>
<script type="text/javascript">
function Punisher() {
var x = Math.random() * 9;
var ans = "";
if(x < 1) {
ans = "Buy/make coffee and serve everyone.";
}
else if(x<2) {
ans = "Write a blog post.";
}
else if(x<3) {
ans = "Come to next class in formal attire.";
}
else if(x<4) {
ans = "Sing/dance in front of class.";
}
else if(x<5) {
ans = "Stand in the corner for one hour.";
}
else if(x<6) {
ans = "Bow to everyone and apologize seriously.";
}
else if(x<7) {
ans = "Push up x2 for every min late.";
}
else if(x<8) {
ans = "Jog to ferry pier during lunch and take a selfie.";
}
else {
ans = "End convo with 'lunch is coming' until lunchtime.";
}
document.getElementById("demo").innerHTML =ans;
}
</script>
</body>
</html>