Skip to content

Commit

Permalink
agrego alerta despues de submit formulario
Browse files Browse the repository at this point in the history
  • Loading branch information
waldohidalgo committed Jan 27, 2024
1 parent 79d93f0 commit 2c44c64
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 3 additions & 4 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,12 @@ background-attachment: fixed no tiene soporte en general navegadores
*/
.background_slider {
background-position: center;
background-repeat: no-repeat;
background-size: cover;

position: fixed;
height: 100vh;
width: 100vw;
width: 100%;
}
section:not(#principal) {
body section:not(#principal) {
background-color: white;
}
.background_slider1 {
Expand Down
10 changes: 10 additions & 0 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,13 @@ function popOverAutor(popoverTriggerEl) {
}

popOverAutor(botonAutor);
/*-----------------------------------------------------------------
Desactivar comportamiento por defecto de submit de formulario y muestra de alerta
*/

const formElement = document.querySelector("#contacto form");

formElement.addEventListener("submit", (evento) => {
evento.preventDefault();
window.alert("Felicidades, la data se ha enviado con éxito");
});

0 comments on commit 2c44c64

Please sign in to comment.