-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
102 lines (83 loc) · 2.64 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Movie trivia</title>
<style>
body {
background: #ccc;
}
.container {
width: 960px;
margin:0 auto;
height:100%;
}
h1 {
text-align: center;
font-family: helvetica;
color: #161616;
}
.cover {
width:100%;
background-image:url('https://anightsatthemovies.files.wordpress.com/2012/03/collage.jpg');
background-repeat:no-repeat;
height:600px;
background-size: 100% 100%;
}
</style>
</head>
<body>
<div class="container">
<h1>Movie trivia</h1>
<section class="cover">
</section>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(window).load(function(){
var score = 0;
var guess = prompt('Who was the main character in the movie Thor?\n1. Brad Pitt\n2. Chris Hemsworth\n3. Tom Cruz\n4. Will Smith', 'Type in number that corresponds with selection');
if (guess == '2') {
alert('Correct!')
score = score + 1
} else {
alert('Incorrect')
}
guess = prompt('Who was the first actor who played James Bond?\n1. Clint Eastwood\n2. Rodney Dangerfield\n3. Tom Hanks\n4. Sean Connery', 'Type in number that corresponds with selection' )
if (guess == '4') {
alert('Correct!');
score = score + 1;
} else {
alert('Incorrect!')
}
guess = prompt('Who played Selena in the Selena movie ?\n1. Angie Martinez\n2. Jennifer Lopez\n3. Reese Witherspoon\n4. Whoopi Goldberg', 'Type in number that corresponds with selection')
if (guess == '2') {
alert('Correct!');
score = score + 1;
} else {
alert('Incorrect!');
}
guess = prompt('In Matilda what was the name of Matilda\'s teacher?')
if (guess == 'truchbull') {
alert('Correct!');
score = score + 1;
} else {
alert('Incorrect!');
}
guess = prompt('In Independence Day, What does Will Smith yell as he blasts off in the space ship?\n1. I gotta get me one of these!\n2. Man, this thing rocks!\n3. Wow, brothers aren\'t supposed to go to space', 'Type in number that corresponds with selection')
if (guess == '1') {
alert('Correct!');
score = score + 1;
} else {
alert('Incorrect!');
}
/*** FINAL TALLY OF SCORE ***/
if ( score < 2 ){
alert('Your score is ' + score + ' out of 5\nHey you have to watch more movies!')
} else {
alert('Your score is ' + score + ' out of 5\nYou did a good job\n You\'re on your way to becoming a movie buff');
}
})
</script>
</body>
</html>