-
Notifications
You must be signed in to change notification settings - Fork 0
/
Index.html
91 lines (78 loc) · 1.91 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
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html>
<head>
<title>CRUD Example</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.input-group {
margin: 20px 0;
}
input {
padding: 8px;
margin-right: 10px;
border: 1px solid #ddd;
border-radius: 4px;
width: 200px;
}
button {
padding: 8px 16px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
margin: 0 5px;
}
button:hover {
background-color: #45a049;
}
#itemList {
list-style: none;
padding: 0;
}
#itemList li {
display: flex;
align-items: center;
padding: 10px;
margin: 5px 0;
background-color: #f9f9f9;
border-radius: 4px;
}
#itemList li button {
margin-left: 10px;
}
.delete-button {
background-color: #f44336;
}
.delete-button:hover {
background-color: #d32f2f;
}
.edit-button {
background-color: #2196F3;
}
.edit-button:hover {
background-color: #1976D2;
}
</style>
</head>
<body>
<h1>Items</h1>
<ul id="itemList"></ul>
<h2>Add New Item</h2>
<div class="input-group">
<input
type="text"
id="newItemName"
placeholder="Item Name"
autoFocus="true"
>
<button onclick="addItem()">Add</button>
</div>
<script src="script.js"></script>
</body>
</html>