From ab403921dd2fd345bde75c23bed7d70db9c08d4b Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Fri, 15 May 2026 16:46:04 -0300 Subject: [PATCH] ejercicio 1: cambio de titulo con querySelector --- ejercicios-clase-8.js | 9 +++++++++ index.html | 1 + 2 files changed, 10 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index af39c43..d4e6f4b 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -1 +1,10 @@ // Vincular este archivo al archivo index.html, y resolver aquí los ejercicios. + +console.log("JS conectado"); + +// 1 +function cambiarTitulo() { + const titulo = document.querySelector("h1"); + + titulo.textContent = "Nuevo título desde JavaScript"; +} \ No newline at end of file diff --git a/index.html b/index.html index 0c393ac..64e23af 100644 --- a/index.html +++ b/index.html @@ -31,5 +31,6 @@

¿Y este párrafo? ¿Será importante?

Este es otro párrafo del montón.

+