-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
35 lines (27 loc) · 1.09 KB
/
Copy pathindex.html
File metadata and controls
35 lines (27 loc) · 1.09 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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DOM y formularios en JavaScript</title>
</head>
<body>
<h1>DOM y formularios en JavaScript</h1>
<p>Gracias al DOM podemos interactuar con los formularios HTML.</p>
<h2>Ejercicio:</h2>
<p>Que el usuario escriba algo en un formulario y, al darle a enviar, el texto aparezca en la propia página (sin recargar).</p>
<hr>
<form class="formulario">
<label for="nombre">Escribe tu nombre:</label>
<input type="text" id="nombre" class="nombre" name="nombre" required>
<label for="edad">Escribe tu edad:</label>
<input type="number" id="edad" class="edad" min="18" max="100" name="edad" required>
<label for="email">Escribe tu email:</label>
<input type="email" id="email" class="email" name="email" required>
<button type="submit" class="btn">Enviar</button>
</form>
<h2>Resultados:</h2>
<div class="resultadoDatos"></div>
<script src="main.js"></script>
</body>
</html>