I. agrega.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>Agregar</title>
10
11
 <script src="dompurify/purify.min.js"></script>
12
 <script type="module" src="libclienteweb/manejaErrores.js"></script>
13
14
</head>
15
16
<body>
17
18
 <form id="formulario">
19
20
  <h1>Agregar</h1>
21
22
  <p><a href="index.html">Cancelar</a></p>
23
24
  <p>
25
   <label>
26
    Nombre *
27
    <input name="nombre">
28
   </label>
29
  </p>
30
31
  <p>
32
   <label>
33
    Pasatiempo
34
    <select name="pasId">
35
     <option value="">Cargando…</option>
36
    </select>
37
   </label>
38
  </p>
39
40
  <p>* Obligatorio</p>
41
42
  <p><button type="submit">Agregar</button></p>
43
44
 </form>
45
46
 <script type="module">
47
48
  import { descargaVista } from "./libclienteweb/descargaVista.js"
49
  import {
50
   configuraSubmitAccion
51
  } from "./libclienteweb/configuraSubmitAccion.js"
52
53
  descargaDatos()
54
55
  async function descargaDatos() {
56
   await descargaVista("api/amigo-vista-agrega.php")
57
   configuraSubmitAccion("api/amigo-agrega.php", formulario, "index.html")
58
  }
59
60
 </script>
61
62
</body>
63
64
</html>
skip_previous skip_next