2022-2023/1NSI/08_Interaction_web/script/1E_index.js

9 lines
282 B
JavaScript
Raw Normal View History

2023-02-23 17:24:09 +00:00
>>> 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"