-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlisttemp.html
More file actions
69 lines (53 loc) · 1.57 KB
/
Copy pathlisttemp.html
File metadata and controls
69 lines (53 loc) · 1.57 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
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script>
function createlist(){
var emps = [];
var y = window.localStorage.getItem("emps");
if (y) {
emps = JSON.parse(y);
}
function displayArrayObjects(arrayObjects) {
var len = arrayObjects.length, text = "";
for (var i = 0; i < len; i++) {
var myObject = arrayObjects[i];
text+="<tr>"+"<td>"+myObject.addname+"</td>"
+"<td>"+myObject.addemail+"</td>"
+"<td>"+myObject.addage+"</td>"
+"<td>"+myObject.addsalary+"</td>"
+"<td>"+myObject.addremark+"</td>"
+"<button onclick="edit()">Edit</button>"
"</tr>"
}
document.getElementById("result").innerHTML=text;
}
displayArrayObjects(emps);
}
</script>
</head>
<body onload="createlist()" >
<div class="navbar">
<a href="test.html">ADD EMPLOYEE</a>
<a href="list.html">DISPLAY</a>
<a href="edit.html">SEARCH</a>
<a href="edit2.html">EDIT</a>
</div>
<h3>Employee Details</h3>
<table align="center">
<thead>
<tr>
<th>NAME</th>
<th>EMAIL</th>
<th>AGE</th>
<th>SALARY</th>
<th>REMARK</th>
<th>EDIT</th>
</tr>
</thead>
<tbody id="result">
</tbody>
</table>
</div>
</body>
</html>