-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
94 lines (81 loc) · 2.26 KB
/
index.html
File metadata and controls
94 lines (81 loc) · 2.26 KB
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
88
89
90
91
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dynamic Tables</title>
<link rel="stylesheet" href="../style/core.css" />
<link rel="stylesheet" href="main.css" />
<script src="Table.js"></script>
<script src="main.js"></script>
</head>
<body>
<h1>Dynamic Tables</h1>
<p>
This example utilize HTML templates, you might want to check the code have for <a href="../html-template-tag/index.html">HTML Templates</a>.
</p>
<hr />
<h2>Add table row; Row entry and delete</h2>
<div class="table-container">
<div class="table-control">
<input id="addProductRow" type="button" value="Add Row" />
</div>
<div class="table">
<table id="productTable">
<thead>
<tr>
<th>UPC Code</th>
<th>Product Name</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<!-- cloned template code will go in here -->
</tbody>
</table>
</div>
</div>
<template id="productRowTemplate">
<tr>
<td><input type="text" /></td>
<td><input type="text" /></td>
<td><input type="button" value="Remove" /></td>
</tr>
</template>
<hr />
<h2>Form entry; table row view, edit, save</h2>
<div class="table-container">
<div class="table-control">
<div>
<label>First Name: <input id="firstName" type="text" /></label>
</div>
<div>
<label>Last Name: <input id="lastName" type="text" /></label>
</div>
<div>
<input id="addUser" type="button" value="Add User" />
</div>
</div>
<div class="table">
<table id="userTable">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<!-- cloned template code will go in here -->
</tbody>
</table>
</div>
</div>
<template id="userRowTemplate">
<tr>
<td><input type="text" readonly /></td>
<td><input type="text" readonly /></td>
<td><input type="button" value="Edit" /><input type="button" value="Remove" /></td>
</tr>
</template>
</body>
</html>