diff --git a/clase-9.js b/clase-9.js index d7804ba..9e2daa2 100644 --- a/clase-9.js +++ b/clase-9.js @@ -27,7 +27,17 @@ lista.addEventListener("click", (e) => { } e.target.classList.add("seleccionado"); - + console.log(e.target.textContent); } +}); + +document.querySelector("#externo").addEventListener("click", () => { + console.log("externo"); +}, true); +document.querySelector("#interno").addEventListener("click", () => { + console.log("interno"); +}); +document.querySelector("#boton").addEventListener("click", () => { + console.log("boton"); }); \ No newline at end of file diff --git a/index.html b/index.html index 7bb9aeb..4a36455 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,11 @@
- +
+
+ +
+