<body>
<p> Question : qui est l'auteur du document intitulé "First Draft of a Report on the EDVAC" </p>
<p>Réponse :
<span id="reponse"></span>
</p>
<button type="button" id="affiche">Afficher</button>
<button type="button" id="cache">Cacher</button>
</body>
#reponse{
color: navy;
font-weight: normal;
}
body {
background-color: cadetblue;
color: white;
margin: 20px;
font-family: optima, arial;
}
let reponse = document.querySelector("#reponse");
let afficheBtn = document.querySelector("#affiche");
afficheBtn.addEventListener("click", afficher);
let cacheBtn = document.querySelector("#cache");
cacheBtn.addEventListener("click", cacher);
function afficher(){
reponse.textContent="John von Neumann"
}
function cacher(){
reponse.textContent=" "
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.