Bertrand Benjamin
5751062905
All checks were successful
continuous-integration/drone/push Build is passing
14 lines
366 B
JavaScript
14 lines
366 B
JavaScript
//gestionnaire d'événement clic pour l'élément bouton
|
|
function calcul_age(){
|
|
let n = document.getElementById("naissance");
|
|
let naissance = parseInt(n.value);
|
|
let date = new Date();
|
|
let courant = date.getFullYear();
|
|
let c = document.getElementById("courant");
|
|
c.innerHTML = courant;
|
|
//àcompléter
|
|
}
|
|
|
|
//age par défaut :
|
|
calcul_age();
|