Feat(NSI): fin du chapitre sur IHM web
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
44
1NSI/08_Interaction_web/codes/projets/evenements.html
Normal file
44
1NSI/08_Interaction_web/codes/projets/evenements.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="fr">
|
||||
|
||||
<!-- Début en-tête -->
|
||||
<head>
|
||||
|
||||
<title>Onmouseover avec JS </title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
<script type="text/Javascript" defer="defer">
|
||||
function chatouille(){
|
||||
let titre = document.getElementById("titre");
|
||||
if (titre.style.color === "red"){
|
||||
titre.style.color = "blue";
|
||||
}
|
||||
else {
|
||||
titre.style.color = "red";
|
||||
}
|
||||
}
|
||||
|
||||
//à compléter avec une fonction griffe
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<!-- Fin en-tête -->
|
||||
|
||||
<!-- Début corps -->
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<!-- à compléter avec un gestionnaire d'événement click -->
|
||||
<h1 onmouseover="chatouille()" id="titre" style='color : red'>J'aime les souris </h1>
|
||||
|
||||
<p>
|
||||
<a href="index.html">Retour à l'accueil</a>
|
||||
</p>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user