-
Notifications
You must be signed in to change notification settings - Fork 0
/
1_multiple_form_actions.html
61 lines (61 loc) · 1.49 KB
/
1_multiple_form_actions.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
<html>
<head>
<title>1. multiple form actions</title>
<link rel="stylesheet" href="./index.css">
<script src="./process-form.js" defer></script>
</head>
<body>
<form>
<table>
<thead>
<tr>
<th>value</th>
<th>action</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="text" name="value_0" value="Test" required>
</td>
<td>
<button name="action_delete" value="0">delete</button>
</td>
</tr>
<tr>
<td>
<input type="text" name="value_1" value="Foo" required>
</td>
<td>
<button name="action_delete" value="1">delete</button>
</td>
</tr>
<tr>
<td>
<input type="text" name="value_2" value="Bar" required>
</td>
<td>
<button name="action_delete" value="2">delete</button>
</td>
</tr>
<tr>
<td colspan="2">
<button name="action_update">update</button>
</td>
</tr>
</tbody>
<tfoot>
<tr class="new-value-row">
<td>
<input type="text" name="new_value" required>
</td>
<td>
<button name="action_add">add</button>
</td>
</tr>
</tfoot>
</table>
</form>
<div id="result"></div>
</body>
</html>