blob: 18ddff1e87600bc8e6e1a61d038c78378edcd057 (
plain)
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
|
<html><script>
function extractFormValues()
{
var firstName = document.getElementById("firstname").value;
var lastName = document.getElementById("lastname").value;
var maleGender = document.getElementById("genderMale");
var femaleGender = document.getElementById("genderFemale");
var gender = "";
if (maleGender.checked)
gender = maleGender.value;
else if (femaleGender.checked)
gender = femaleGender.value;
var updates = document.getElementById("updates").checked;
formExtractor.setValues(firstName, lastName, gender, updates);
}
</script><body>
<h1>
The Green People Book Club
</h1>
<p>
Welcome to The Green People Book Club. Please register to obtain a membership with us.
</p>
<form onsubmit="extractFormValues()">
<table>
<tbody><tr>
<td>
First name:
</td>
<td>
<input type="text" id="firstname">
</td>
</tr>
<tr>
<td>
Last name:
</td>
<td>
<input type="text" id="lastname">
</td>
</tr>
<tr>
<td>
Gender:
</td>
<td>
<input type="radio" name="gender" id="genderMale" value="Male"> Male
<input type="radio" name="gender" id="genderFemale" value="Female"> Female
</td>
</tr>
<tr>
<td colspan="2">
<input type="checkbox" id="updates" value="receive">
Check here if you would like to receive regular updates from us:
</td>
</tr>
</tbody></table>
<input type="submit" value="Submit">
</form>
</body></html>
|