table js
This commit is contained in:
@@ -10,6 +10,26 @@ const zoneMsg = document.getElementById("msg");
|
||||
const txt_restant = document.getElementById("txt_restant");
|
||||
const MAX = 500;
|
||||
const formulaire = document.querySelector("form");
|
||||
const services = [
|
||||
{
|
||||
nom: "Géolocalisation",
|
||||
description: "Suivi en temps réel",
|
||||
prix: "30€/véhicule/mois",
|
||||
},
|
||||
{ nom: "Odomètre", description: "Kilométrage précis", prix: "200€" },
|
||||
{
|
||||
nom: "Consommation",
|
||||
description: "Carburant consommé",
|
||||
prix: "15€/véhicule/mois",
|
||||
},
|
||||
{
|
||||
nom: "Impact carbone",
|
||||
description: "CO₂ rejeté",
|
||||
prix: "30€/véhicule/mois",
|
||||
},
|
||||
];
|
||||
const corps = document.getElementById("services");
|
||||
let lignes = "";
|
||||
let nbVehicules = 1;
|
||||
function mettreAJourGPS() {
|
||||
affichageNb.textContent = nbVehicules;
|
||||
@@ -52,3 +72,17 @@ formulaire.addEventListener("submit", function (evenement) {
|
||||
alert("Merci de remplir tous les champs");
|
||||
}
|
||||
});
|
||||
for (const service of services) {
|
||||
console.log(service.nom + " _ " + service.description + " _ " + service.prix);
|
||||
}
|
||||
for (const service of services) {
|
||||
lignes =
|
||||
lignes +
|
||||
`
|
||||
<tr>
|
||||
<td>${service.nom}</td>
|
||||
<td>${service.description}</td>
|
||||
<td>${service.prix}</td>
|
||||
</tr>`;
|
||||
}
|
||||
corps.innerHTML = lignes;
|
||||
|
||||
+2
-20
@@ -26,26 +26,8 @@
|
||||
<th>Prix</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>Géolocalisation</td>
|
||||
<td>Afin de retrouver l'ensemble de vos véhicules sur une carte en temps réel !</td>
|
||||
<td>30€/véhicule/mois</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Odomètre</td>
|
||||
<td>Ayez accès à un killomètrage précis.</td>
|
||||
<td>200€</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Consommation</td>
|
||||
<td>Le carburant consommé par votre flotte.</td>
|
||||
<td>15£/véhicule/mois</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Impact Carbonne</td>
|
||||
<td>Ayez sous les yeux tous les chiffres concernant le CO2 rejeté par votre flotte</td>
|
||||
<td>30€/véhicule/mois</td>
|
||||
</tr>
|
||||
<tbody id="services">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<section class="simulateur, padding_left" >
|
||||
|
||||
Reference in New Issue
Block a user