From 62568e59d1604101838be4f9a66190c334199b3c Mon Sep 17 00:00:00 2001 From: ItsTheSky Date: Fri, 29 May 2026 00:08:17 +0200 Subject: [PATCH] add photo column to the voiliers table and display images in the AJAX data --- index.php | 1 + scripts/Exercice_2_AJAX.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/index.php b/index.php index 8d560a9..1a0d4c7 100644 --- a/index.php +++ b/index.php @@ -111,6 +111,7 @@   + Photo Voilier Skippers Abandon diff --git a/scripts/Exercice_2_AJAX.js b/scripts/Exercice_2_AJAX.js index e545823..f38a59b 100644 --- a/scripts/Exercice_2_AJAX.js +++ b/scripts/Exercice_2_AJAX.js @@ -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 = '' + voilier.nom + ''; + tr.appendChild(td_photo); + const td_nom = document.createElement('td'); td_nom.innerText = voilier.nom + " " + voilier.annĂ©e tr.appendChild(td_nom);