-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
57 lines (51 loc) · 1.72 KB
/
main.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
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<!-- Enclose the title of the page in <h1> tags. -->
<!-- This means "header 1" which will make the text appear larger
and at the top of the screen. -->
<h1>Would you rather...</h1>
<div>
<!-- choice 1 -->
<!-- Put the buttons in "choice" and "button"
classes so that they can be styled together later.
For now, the value of the buttons are blank
because we'll use a function to determine
the corresponding values later. FYI, the value
of a button is the text that appears on top of it. -->
<div class="choice" id="choice1">
<input type="button" class="button" id="button1"
value= ""
onclick="window.open('choice1.html', '_blank');"> <!-- opens new tab -->
</input>
</div>
<p>OR</p>
<!--choice 2 -->
<div class="choice" id="choice2">
<input type="button" class="button" id="button2"
value=""
onclick="window.open('choice2.html', '_blank');"> <!-- opens new tab -->
</input>
</div>
</div>
<div>
<p>Don't like this question?</p>
<input type="button" class="button" id="new_q_button"
value="Give me a different question!"
onclick="window.location.reload();">
</input>
</div>
<!-- use src to reference an external javascript file -->
<!-- please note that when using src, the script tag should be empty -->
<script text="text/javascript" src="choices.js"></script>
<!-- This calls our functions from choices.js -->
<script>
setRandNum(); // sets the variable randNum for all html files to use
getChoice1(); // sets the value for button1
getChoice2(); // sets the value for button2
</script>
</body>
</html>