-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.js
More file actions
27 lines (21 loc) · 755 Bytes
/
scripts.js
File metadata and controls
27 lines (21 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const form = document.querySelector("#form");
const nome = document.querySelector("#name")
const emailEl = document.querySelector("#gmail");
const askButton = document.querySelector("#send")
const password = document.getElementById("senha-confirmacao");
const enviarFormulario = (evento)=>{
evento.preventDefault();
const inputEl = document.querySelectorAll(".required");
askButton.disabled = true;
askButton.textContent = "Cadastrando..."
askButton.classList.add("loading")
try{
}catch(error){
console.log("Error na aplicação ")
} finally {
askButton.disabled = false;
askButton.textContent = "Cadastrar"
askButton.classList.remove("loading")
}
}
form.addEventListener('submit', enviarFormulario)