From 9c811646732aa0edba99249b5684d644904e8385 Mon Sep 17 00:00:00 2001 From: lucio <47898791@terciariourquiza.edu.ar> Date: Thu, 14 May 2026 15:39:37 -0300 Subject: [PATCH 1/4] Primer EJ terminado --- ejercicios-clase-8.js | 4 ++++ index.html | 1 + 2 files changed, 5 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index af39c43..d53afe0 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -1 +1,5 @@ // Vincular este archivo al archivo index.html, y resolver aquí los ejercicios. +//1 +const tituloh1 = document.querySelector("h1") +console.log(tituloh1.textContent); +tituloh1.textContent = "Titulo reemplazado correctamente" \ No newline at end of file diff --git a/index.html b/index.html index 0c393ac..ebffcd8 100644 --- a/index.html +++ b/index.html @@ -32,4 +32,5 @@

Este es otro párrafo del montón.

+ -- 2.49.1 From e59c8a8a164419a4fc93472b4f828140aa6e6205 Mon Sep 17 00:00:00 2001 From: lucio <47898791@terciariourquiza.edu.ar> Date: Thu, 14 May 2026 22:19:28 -0300 Subject: [PATCH 2/4] EJ 2 y 3 terminados + arreglo de la hoja de estilos --- ejercicios-clase-8.js | 19 ++++++++++++++++++- estilo.css | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index d53afe0..6d70a80 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -2,4 +2,21 @@ //1 const tituloh1 = document.querySelector("h1") console.log(tituloh1.textContent); -tituloh1.textContent = "Titulo reemplazado correctamente" \ No newline at end of file +tituloh1.textContent = "Titulo reemplazado correctamente" + +//2 +function List(){ + const items = document.querySelectorAll("ul li") + for (const item of items){ + item.classList.add("item-lista") + } +} + +//3 +function agregarItem(texto){ + const nuevoLi = document.createElement("li"); + nuevoLi.textContent = texto; + const lista = document.getElementById("lista-inicial"); + lista.appendChild(nuevoLi); +} + diff --git a/estilo.css b/estilo.css index fcb26fc..07d655d 100644 --- a/estilo.css +++ b/estilo.css @@ -100,6 +100,9 @@ h1 { color: #7a5200; font-weight: bold; } +.item-lista{ + color:#d7263d; +} /* ========================= IMAGEN -- 2.49.1 From 27145b04b1a28f2738f6ab5b5e8d104ebfc524b3 Mon Sep 17 00:00:00 2001 From: lucio <47898791@terciariourquiza.edu.ar> Date: Tue, 19 May 2026 19:46:11 -0300 Subject: [PATCH 3/4] EJ6 terminado --- .vscode/launch.json | 15 +++++++++++++ ejercicios-clase-8.js | 51 ++++++++++++++++++++++++++++++++++++++++--- index.html | 2 +- 3 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..2ba986f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 6d70a80..a714b33 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -1,22 +1,67 @@ // Vincular este archivo al archivo index.html, y resolver aquí los ejercicios. //1 +/* const tituloh1 = document.querySelector("h1") console.log(tituloh1.textContent); tituloh1.textContent = "Titulo reemplazado correctamente" - +*/ //2 +/* function List(){ const items = document.querySelectorAll("ul li") for (const item of items){ item.classList.add("item-lista") } } - +*/ //3 +/* function agregarItem(texto){ const nuevoLi = document.createElement("li"); nuevoLi.textContent = texto; const lista = document.getElementById("lista-inicial"); lista.appendChild(nuevoLi); } - +*/ +//4 +/* +function div(){ + const lista_de_parrafos = document.querySelectorAll("#parrafos p"); + for (const un_parrafo of lista_de_parrafos) { + if (un_parrafo.textContent.indexOf("importante") > -1){ + un_parrafo.classList.add("destacado"); + } + } +} +*/ +//5 +/* +function nuevoDiv(){ + const contenedor = document.createElement('div') + const titulo = document.createElement('h2') + titulo.textContent = 'Sabores de la region del litoral'; + const parrafo = document.createElement('p'); + parrafo.textContent = 'Lista de sabores'; + const lista = document.createElement('li') + const comidas = [ + 'Chipa', + 'Pescado de rio a la parrilla', + 'Chupin', + 'Sopa paraguaya' + ]; + comidas.forEach(comida => { + const item = document.createElement('li'); + item.textContent = comida; + lista.appendChild(item); + }); +} +*/ +//6 +function limpiarLista(listaInicial){ + const lista = document.getElementById(listaInicial); + if (lista) { + lista.innerHTML = "" + } else { + console.warn(`No se encontró ninguna lista con el id: "${listaInicial}"`); + } +} diff --git a/index.html b/index.html index ebffcd8..ba513e3 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ tiene sus propias comidas típicas, hay algunas que son tradicionales en casi todas las provincias:

-