Feat(NSI): premier exercice js
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:
11
1NSI/08_Interaction_web/script/1E_index.html
Normal file
11
1NSI/08_Interaction_web/script/1E_index.html
Normal 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>
|
8
1NSI/08_Interaction_web/script/1E_index.js
Normal file
8
1NSI/08_Interaction_web/script/1E_index.js
Normal 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"
|
9
1NSI/08_Interaction_web/script/1E_interaction.js
Normal file
9
1NSI/08_Interaction_web/script/1E_interaction.js
Normal 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 !") ; } ;
|
Reference in New Issue
Block a user