-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (38 loc) · 1.13 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
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<style>
th{
color:#fff;
}
</style>
<title></title>
</head>
<body>
<table class="table table-striped">
<tr class="bg-info">
<th>Marc's Capes</th>
</tr>
<tbody id="myTable"></tbody>
</table>
<center><img width="500" height="667" src="https://user-images.githubusercontent.com/52789876/114279105-f241ad00-9a00-11eb-9713-6000f133614f.jpg"></center> <!--Image of Marc-->
<script>
$.getJSON('https://www.faav.tk/v1/namemc/capes?username=Marc', function(data123) { //API URL https://www.faav.tk/v1/namemc/capes?username=Marc
buildTable(data123)
function buildTable(data){
var table = document.getElementById('myTable')
for (var i = 0; i < data.length; i++){
var row = `<tr>
<td>${data[i].name}<\/td>
<\/tr>`
table.innerHTML += row
}
}
}
)
</script>
</body>
</html>