-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
83 lines (83 loc) · 3.36 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DOM Manipulation with Forms</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-5">
<h1>Form Submission</h1>
<form id="userForm">
<div class="form-group">
<label for="firstName">First Name</label>
<input type="text" class="form-control" id="firstName" required>
</div>
<div class="form-group">
<label for="lastName">Last Name</label>
<input type="text" class="form-control" id="lastName" required>
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" class="form-control" id="email" required>
</div>
<div class="form-group">
<label for="address">Address</label>
<input type="text" class="form-control" id="address" required>
</div>
<div class="form-group">
<label for="pincode">Pincode</label>
<input type="text" class="form-control" id="pincode" required>
</div>
<div class="form-group">
<label for="gender">Gender</label>
<select class="form-control" id="gender" required>
<option value="">Select</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
</div>
<div class="form-group">
<label for="food">Choice of Food (select at least 2)</label>
<div>
<input type="checkbox" id="food1" value="Pizza"> Biriyani
<input type="checkbox" id="food2" value="Burger"> Parotta
<input type="checkbox" id="food3" value="Pasta"> Chicken Fry
<input type="checkbox" id="food4" value="Salad"> Mutton
<input type="checkbox" id="food5" value="Sushi"> Meals
</div>
</div>
<div class="form-group">
<label for="state">State</label>
<input type="text" class="form-control" id="state" required>
</div>
<div class="form-group">
<label for="country">Country</label>
<input type="text" class="form-control" id="country" required>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<h2 class="mt-5">Submitted Data</h2>
<table class="table table-bordered">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Address</th>
<th>Pincode</th>
<th>Gender</th>
<th>Food</th>
<th>State</th>
<th>Country</th>
</tr>
</thead>
<tbody id="userTableBody">
</tbody>
</table>
</div>
<script src="script.js"></script>
</body>
</html>