-
Notifications
You must be signed in to change notification settings - Fork 54
/
mswishe7-assignment2.html
64 lines (63 loc) · 2.57 KB
/
mswishe7-assignment2.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
<!DOCTYPE html>
<!-- there should be an html tag here, but that was my mistake -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery-min.js"></script>
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript">
function checkMembers(num)
{
if(num.value != 2)
alert("Wrong answer. Try again.");
if(num.value == 2)
alert("Correct! Good job!");
}
function validateText(text)
{
if(text.value == "")
alert("Please enter text in the box!");
}
</script>
</head>
<body>
<!-- ** -1 ** form does not submit, validation is not integrated with submission -->
<!-- ** -1 ** no animation -->
<!-- ** -1 ** no DOM manipulation -->
<div id="content">
<h1> CS 230 Lab Assignment 2 - Mark Swisher</h1>
<div class = "center_image">
<img src = "http://www.billboard.com/files/media/daft-punk-2013-650-430-b.jpg">
</div>
<h2> Favorite Member of Daft Punk</h2>
<div clas = "subsection">
<form method="post" action="http://symlink.dk/code/php/submit/">
<input type="radio" name="favorite" value="Thomas Bangalter"> Thomas Bangalter<br>
<input type="radio" name="favorite" value="Guy-Manuel de Hommem Christo"> Guy-Manuel de Hommem Christo<br>
<br>
<br>
How many members are in Daft Punk?<input id="numbAnswer" type="text"></input>
<button type = "button" onclick="checkMembers(numbAnswer)">SubmitAnswer</button>
<br>
<br>
Favorite Daft Punk Song: <input type = "text" name = "textBox"></input>
<button type="button" onclick="validateText(textBox)">Submit Answer</button>
<br>
<br>
Which helmet looks cooler?<input type="text" name="cooler"></input>
<button type="button" onclick="validateText(cooler)">Submit</button>
<br>
<br>
Favorite Daft Punk Album
<select name="albums" id="albumSelect">
<option value="RAM">Random Access Memories</option>
<option value="Tron">Tron: Legacy Soundtrack</option>
<option value="HAA">Human After All</option>
<option value="Disc">Discovery</option>
<option value="HW">Homework</option>
</select>
</form>
</div>
</div>
</body>
</html>