-
Notifications
You must be signed in to change notification settings - Fork 53
/
tsutro-assignment2.html
87 lines (66 loc) · 2.13 KB
/
tsutro-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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<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>
</head>
<body>
<!-- ** -2 ** no validation -->
<div id="content">
<!-- HTML can be quirky ... you actually need a / at the end of the action for the POST to submit properly -->
<form action="http://symlink.dk/code/php/submit/" method="POST">
<!-- <br></br> or shorthand <br />
close your input tags as well -->
First Name:<input type="text" name="fname"><br>
<input type="Submit" value="Submit"><br>
<br>
Please select your class status.<br>
<!-- this is not being submitted, add a name attribute to your select tag -->
<select>
<option value="Freshman">Freshman</option>
<option value="Sophomore">Sophomore</option>
<option value="Junior">Junior</option>
<option value="Senior">Senior</option>
</select><br>
<br>
Are you Male or Female?<br>
<label for="male">Male</label>
<input type="radio" name="sex" id="male" value="male"><br>
<label for="female">Female</label>
<input type="radio" name="sex" id="female" value="female"><br>
<br>
The title of the document is:
<p id="file"></p>
<button type="button" onclick="fileName()">Find File</button>
<br>
<h2>Do you want to know the date?</h2>
<p>Click the button to display the date.</p>
<p id="date"></p>
<button type="button" onclick="getDate()">Date</button>
<br>
<p id="Goodbye">
Click on this button if you are finished
</p>
<button type="button" onclick="sayGoodbye()">Click Me!</button>
<br>
</form>
<!-- syntax error -->
<img src=<p><a href="http://www.desicomments.com/"></img>
</div>
<script>
function sayGoodbye()
{
document.getElementById("Goodbye").innerHTML="Goodbye";
}
function getDate()
{
document.getElementById("date").innerHTML = Date();
}
function fileName()
{
document.write(document.title);
}
</script>
</body>
</html>