I. login.html

1<!DOCTYPE html>
2<html lang="es">
3
4<head>
5
6 <meta charset="UTF-8">
7 <meta name="viewport" content="width=device-width">
8
9 <title>Iniciar sesión</title>
10
11 <script type="module" src="lib/js/submitForm.js"></script>
12 <script type="module" src="lib/js/muestraError.js"></script>
13 <script type="module" src="./js/protege.js"></script>
14
15</head>
16
17<body onload="protege().then(sesion => {
18 if (sesion.cue !== '') {
19 location.href = 'perfil.html'
20 }
21 })">
22
23 <form id="login" onsubmit="submitForm('srv/login.php', event)
24 .then(sesion => location.href = 'perfil.html')
25 .catch(muestraError)">
26
27 <h1>Iniciar Sesión</h1>
28
29 <p><a href="perfil.html">Cancelar</a></p>
30
31 <p>
32 <label>
33 Cue
34 <input name="cue">
35 </label>
36 </p>
37
38 <p>
39 <label>
40 Match
41 <input type="password" name="match">
42 </label>
43 </p>
44
45 <p><button type="submit">Iniciar sesión</button></p>
46
47 </form>
48
49</body>
50
51</html>
skip_previous skip_next