-
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
01b5048
commit 5cbf1e7
Showing
1 changed file
with
14 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
document.getElementById('loginForm').addEventListener('submit', function(event) { | ||
event.preventDefault(); | ||
|
||
var username = document.getElementById('username').value; | ||
var password = document.getElementById('password').value; | ||
|
||
// Simulação de autenticação (substitua isso com sua lógica de autenticação real) | ||
if (username === 'usuario' && password === 'senha') { | ||
alert('Login bem-sucedido!'); | ||
// Aqui você pode redirecionar o usuário para outra página | ||
} else { | ||
document.getElementById('error-msg').textContent = 'Credenciais inválidas. Por favor, tente novamente.'; | ||
} | ||
}); |