From 5fd85a5b97785fc1a7928b68fd98b4c3d61bf0c8 Mon Sep 17 00:00:00 2001 From: ca220971 Date: Fri, 16 Feb 2024 16:14:02 +0100 Subject: [PATCH 1/3] =?UTF-8?q?cr=C3=A9ation=20des=20prototypes=20et=20mod?= =?UTF-8?q?ification=20de=20generateCar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 3 +-- js/car.js | 11 +++++++++++ js/extra.js | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 js/car.js create mode 100644 js/extra.js diff --git a/index.html b/index.html index be6da78..d7810a3 100644 --- a/index.html +++ b/index.html @@ -36,8 +36,7 @@ + -- GitLab From 78b875e3031b1b2161ef50b587c466b7cddf6324 Mon Sep 17 00:00:00 2001 From: ca220971 Date: Fri, 16 Feb 2024 16:43:15 +0100 Subject: [PATCH 3/3] commit --- index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 606fa23..54d4f0a 100644 --- a/index.html +++ b/index.html @@ -41,14 +41,13 @@ return new Car(image, make, model, description, price, category, year, mileage, extras) } - Car.prototype.generateImage(elt) = function(elt){ + Car.prototype.generateImage = function(elt){ const image = document.createElement("img") image.setAttribute("class","card-img-top") image.setAttribute("src",this.image) - image.setAttribute("alt",""+ma+mo) + image.setAttribute("alt",this.ma+this.mo) elt.appendChild(image) } - function showHideExtra(btn,elt,car) { } -- GitLab