-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
105 lines (97 loc) · 3.72 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Curd with javascript fetch</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container">
<div class="alerts">
<div class="alert alert-success">gg</div>
<div class="alert alert-danger">ee</div>
</div>
</div>
<div class="container-fluid">
<div class="container">
<h1>Crud with Javascript fetch api</h1>
</div>
</div>
<div class="container">
<div class="card">
<div class="card-body">
<h3>Students ( <span id="total"></span> )</h4>
<button class="btn btn-primary" id="create">Create</button>
</div>
</div>
</div>
<div class="container">
<div class="table-responsive">
<table>
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Age</th>
<th>Country</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
</div>
<!-- create student model -->
<!-- <div class="container"> -->
<div class="modal" id="create-student">
<div class="modal-body">
<h3>Create Student</h3>
<div class="form-group">
<label for=""><b>Enter your Name</b></label>
<input type="text" placeholder="Enter your name" id="name" class="form-control">
</div>
<div class="form-group">
<label for=""><b>Enter your Age</b></label>
<input type="number" placeholder="Enter your age" id="age" class="form-control">
</div>
<div class="form-group">
<label for=""><b>Enter your Country</b></label>
<input type="text" placeholder="Enter your country" id="country" class="form-control">
</div>
<div class="form-group buttons">
<button class="btn btn-success" type="submit" id="save">Save</button>
<button class="btn btn-danger" type="submit" id="close">Close</button>
</div>
</div>
</div>
<!-- </div> -->
<!-- edit student -->
<div class="modal" id="update-student">
<div class="modal-body">
<h3>Update Student</h3>
<div class="form-group">
<label for=""><b>Enter your Name</b></label>
<input type="text" placeholder="Enter your name" id="edit_name" class="form-control">
<input type="hidden" placeholder="Id" id="id" class="form-control">
</div>
<div class="form-group">
<label for=""><b>Enter your Age</b></label>
<input type="number" placeholder="Enter your age" id="edit_age" class="form-control">
</div>
<div class="form-group">
<label for=""><b>Enter your Country</b></label>
<input type="text" placeholder="Enter your country" id="edit_country" class="form-control">
</div>
<div class="form-group buttons">
<button class="btn btn-success" id="update" type="submit">Update</button>
<button class="btn btn-danger" type="submit" id="update_close">Close</button>
</div>
</div>
</div>
<script src="js/app.js"></script>
</body>
</html>