-
Notifications
You must be signed in to change notification settings - Fork 2
/
conferencesjsontable.html
44 lines (32 loc) · 1.02 KB
/
conferencesjsontable.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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<style>
th{
color: #fff
}
</style>
<table class="table table-striped">
<tr class="bg-info">
<th>Conference Name</th>
<th>Conference Date</th>
<th>Application/Info link</th>
</tr>
<tbody id="myTable">
</tbody>
</table>
<script>
var myArray = [
]
buildTable(myArray)
function buildTable2(data){
var table = document.getElementById('myTable')
for (var i = 0; i < data.length; i++){
var row = `<tr>
<td>${data[i].conferenceName}</td>
<td>${data[i].conferenceDate}</td>
<td>${data[i].applicationLink}</td>
</tr>`
table.innerHTML += row
}
}
</script>