add photo column to the voiliers table and display images in the AJAX data
This commit is contained in:
@ -111,6 +111,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>Photo</td>
|
||||
<td>Voilier</td>
|
||||
<td>Skippers</td>
|
||||
<td>Abandon</td>
|
||||
|
||||
@ -59,6 +59,11 @@ function rafraichirTableau(voiliers) {
|
||||
td_id.innerText = i.toString();
|
||||
tr.appendChild(td_id);
|
||||
|
||||
const td_photo = document.createElement('td');
|
||||
td_photo.width = 400;
|
||||
td_photo.innerHTML = '<img src="' + voilier.photo + '" alt="' + voilier.nom + '" width="400">';
|
||||
tr.appendChild(td_photo);
|
||||
|
||||
const td_nom = document.createElement('td');
|
||||
td_nom.innerText = voilier.nom + " " + voilier.année
|
||||
tr.appendChild(td_nom);
|
||||
|
||||
Reference in New Issue
Block a user