as avances en el ejercicio5

This commit is contained in:
romeo
2026-05-26 15:08:20 -03:00
parent bdc6a29027
commit bd0f72b70b
2 changed files with 4 additions and 0 deletions

View File

@@ -106,6 +106,7 @@ form.addEventListener('submit' , (e) =>{
e.preventDefault();
if (nombre.value.trim() === '') {
console.log('nombre vacio, reintenta');
document.querySelector('#error-nombre').textContent = 'error nombre';
return;
} else if (edad.value > 120 || edad.value < 0){
console.log('edad inverosimil');