-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ddb81ae
commit 0855c45
Showing
4 changed files
with
130 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*const mensaje = document.getElementById('mensaje'); | ||
const frases = [ | ||
"Mensaje 1", | ||
"Mensaje 2", | ||
"Mensaje 3", | ||
// Agrega más mensajes aquí | ||
]; | ||
function obtenerFraseAleatoria() { | ||
const indice = Math.floor(Math.random() * frases.length); | ||
return frases[indice]; | ||
} | ||
function mostrarFraseAleatoria() { | ||
const mensajeDiv = document.getElementById("mensaje"); | ||
mensajeDiv.textContent = ""; | ||
const frase = obtenerFraseAleatoria(); | ||
for (let i = 0; i < frase.length; i++) { | ||
setTimeout(() => { | ||
mensajeDiv.textContent += frase[i]; | ||
}, i * 100); // Controla la velocidad de escritura | ||
} | ||
} | ||
// Mostrar una frase al cargar la página | ||
mostrarFraseAleatoria();*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters