-
Notifications
You must be signed in to change notification settings - Fork 0
/
bsLogin1.html
49 lines (46 loc) · 1.97 KB
/
bsLogin1.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
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=}, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
</head>
<body>
<div class="container">
<form action="" id="formulario">
<div class="mb-3 mt-3">
<label for="nombre" class="form-label">Ingrese usuario</label>
<input type="text" id="nombre" name="nombre" class="form-control">
</div>
<div class="mb-3">
<label for="clave" class="form-label">Ingrese clave</label>
<input type="password" id="clave" name="clave" class="form-control">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary">Aceptar</button>
</div>
</form>
<script>
window.onload= iniciarEventos
function iniciarEventos(){
document.getElementById("formulario").onsubmit = verificar
}
const user = "MarinaCh"
const pw = 1234
function verificar(){
let usuario = document.getElementById("nombre").value
let clave = document.getElementById("clave").value
if(usuario == user && clave == pw){
window.alert("Login existoso")
}else{
alert("Verifique los datos ingresados")
}
}
</script>
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa" crossorigin="anonymous"></script>
</div>
</body>
</html>