Feat(NSI): premier exercice js
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-02-23 18:24:09 +01:00
parent cfa6b42e23
commit e9a07c0061
6 changed files with 56 additions and 5 deletions

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<head>
<title> "Languages" </title>
<meta charset="utf-8">
<body>
<ul id="langages">
<li> HTML </li>
<li> CSS </li>
</ul>
</body>
</html>

View File

@@ -0,0 +1,8 @@
>>> let languages = document.getElementById("languages")
>>> languages.style.color = "red"
>>> let item1 = languages.children[0]
>>> item1
>>> item1.innerHTML = 'HTML5'
>>> let item3 = document.createElement("li")
>>> languages.appendChild(item3)
>>> item3.innerHTML = "Javascript"

View File

@@ -0,0 +1,9 @@
function apparition(){
list.style.visibility = "visible";
}
function disparition(){
list.style.visibility = "hidden";
}
list.onmouseover = disparition ;
list.onmouseleave = apparition ;
list.onclick = function() { alert("Clic !") ; } ;