File "code001.html"

Full Path: /home/analogde/www/Diabete/Provisoire/code001.html
File size: 869 bytes
MIME-type: text/html
Charset: utf-8

<!DOCTYPE html>
<html lang="fr">
<head>
  <meta charset="UTF-8">
  <title>Page 1 - Envoi</title>
</head>
<body>
  <h2>Page 1 : Génération des données</h2>
  <button onclick="envoyerDonnees()">Envoyer les données à la Page 2</button>

  <script>
    const jsonData = [
      { id: 1, nom: "Alice", age: 25 },
      { id: 2, nom: "Bob", age: 30 },
      { id: 3, nom: "Charlie", age: 22 },
      { id: 4, nom: "Diana", age: 28 },
      { id: 5, nom: "Ethan", age: 35 },
      { id: 6, nom: "Fiona", age: 27 },
      { id: 7, nom: "George", age: 24 },
      { id: 8, nom: "Hannah", age: 29 },
      { id: 9, nom: "Ian", age: 31 },
      { id: 10, nom: "Julia", age: 26 }
    ];

    function envoyerDonnees() {
      localStorage.setItem("donneesUtilisateurs", JSON.stringify(jsonData));
      window.location.href = "code003.html";
    }
  </script>
</body>
</html>