-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjscomhtml.html
More file actions
38 lines (33 loc) · 1.24 KB
/
jscomhtml.html
File metadata and controls
38 lines (33 loc) · 1.24 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tela de Login</title>
</head>
<body>
<div class="login-container">
<h1>Tela de Login</h1>
<form>
<label for="username">Nome de usuário:</label>
<input type="text" id="username" placeholder="Seu nome de usuário" required>
<label for="password">Senha:</label>
<input type="password" id="password" placeholder="Sua senha" required>
<button type="button" onclick="login()">Entrar</button>
</form>
</div>
<div id="login-result"></div>
<script>
function login() {
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
// Simulação de verificação de login
if (username === 'usuario' && password === 'senha') {
document.getElementById('login-result').innerHTML = 'Login bem-sucedido!';
} else {
document.getElementById('login-result').innerHTML = 'Login falhou. Verifique suas credenciais.';
}
}
</script>
</body>
</html>