-
Notifications
You must be signed in to change notification settings - Fork 0
/
Login.html
40 lines (38 loc) · 1.31 KB
/
Login.html
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
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="pt-br">
<head>
<link rel="stylesheet" type="text/css" href="login.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login do Usuário</title>
</head>
<body>
<div class="login">
<h1>Login</h1>
<form>
<p>Usuário</p>
<input type="text" name="username" placeholder="Insira o Nome de Usuário" id="admin">
<p>Senha</p>
<input type="password" name="password" placeholder="Insira sua Senha" id="123">
<input type="submit" name="" value="Entrar" onclick="login(event)">
<a href="#">Esqueceu sua senha?</a>
<a href="#">Não Possui Conta?Faça um Cadastro</a>
</form>
<script>
function login(event){
event.preventDefault();
var usuario = document.getElementsByName('username')[0].value;
usuario = usuario.toLowerCase();
var senha = document.getElementsByName('password')[0].value;
var senha = senha.toLowerCase();
if (usuario =="admin" && senha == "123") {
alert("dados corretos")
window.location="EspaçoUsuario.html";
}else{
alert("Usuário e Senhas Incorretos")
}
}
</script>
</div>
</body>
</html>