-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinto4.html
More file actions
142 lines (119 loc) · 4.23 KB
/
into4.html
File metadata and controls
142 lines (119 loc) · 4.23 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html lang="en">
<head>
<title>Department Data</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
/* Reset default margin and padding */
body, html {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
.wrapper {
width: 80%;
margin: 40px auto;
}
#data_table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
font-size: 18px;
text-align: left;
}
#data_table th,
#data_table td {
padding: 12px 15px;
border: 1px solid #ddd;
}
/* Style for the table rows */
#data_table tr:nth-child(even) {
background-color: #85f2e5;
}
#data_table tr:hover {
background-color: #d33737;
}
input[type="button"] {
padding: 5px 10px;
margin: 5px;
border: none;
cursor: pointer;
border-radius: 3px;
width: 70px;
text-align: center;
}
input[type="button"].edit {
background-color: #d974a3;
color: white;
}
input[type="button"].delete {
background-color: #ecc331;
color: white;
}
input[type="button"].save {
background-color: #5bbcc5;
color: white;
}
input[type="button"].add {
background-color: #129d63;
color: white;
}
input[type="text"] {
padding: 5px;
width: 95%;
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="wrapper">
<table align="center" id="data_table" cellspacing="2" cellpadding="5" border="1">
<tr>
<th>DID</th>
<th>NAME</th>
<th>DEPT</th>
<th>ACTIONS</th>
</tr>
<tr id="row1">
<td id="DID_row1">ee001</td>
<td id="NAME_row1">Elisha</td>
<td id="DEPT_row1">EEE</td>
<td>
<input type="button" id="edit_button1" value="edit" class="edit" onclick="edit_row('1')">
<input type="button" id="delete_button1" value="delete" class="delete" onclick="delete_row('1')">
<input type="button" id="Save_button1" value="save" class="save" style="display:none;" onclick="save_row('1')">
</td>
</tr>
<tr id="row2">
<td id="DID_row2">ee002</td>
<td id="NAME_row2">Manav</td>
<td id="DEPT_row2">EEE</td>
<td>
<input type="button" id="edit_button2" value="edit" class="edit" onclick="edit_row('2')">
<input type="button" id="delete_button2" value="delete" class="delete" onclick="delete_row('2')">
<input type="button" id="Save_button2" value="save" class="save" style="display:none;" onclick="save_row('2')">
</td>
</tr>
<tr id="row3">
<td id="DID_row3">ee003</td>
<td id="NAME_row3">Tejas</td>
<td id="DEPT_row3">EEE</td>
<td>
<input type="button" id="edit_button3" value="edit" class="edit" onclick="edit_row('3')">
<input type="button" id="delete_button3" value="delete" class="delete" onclick="delete_row('3')">
<input type="button" id="Save_button3" value="save" class="save" style="display:none;" onclick="save_row('3')">
</td>
</tr>
<tr>
<td><input type="text" id="new_DID"></td>
<td><input type="text" id="new_NAME"></td>
<td><input type="text" id="new_DEPT"></td>
<td><input type="button" class="add" onclick="add_row()" value="add row"></td>
</tr>
</table>
</div>
<script src="index.js"></script>
</body>
</html>