forked from juandc/platzi-curso-practico-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfiguras.html
87 lines (76 loc) · 2.31 KB
/
figuras.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Figuras geométricas | Curso Práctico de JavaScript en Platzi</title>
</head>
<body>
<header>
<h1>
Figuras geométricas
</h1>
<p>Este es el primer taller del curso práctico de JavaScript</p>
</header>
<section id="SectionCuadrado">
<h2>Calcula el área y perímetro de un cuadrado</h2>
<form>
<label for="InputCuadrado">
Escribe cuánto mide cada lado de tu cuadrado:
</label>
<input id="InputCuadrado" type="number" />
<button type="button" onclick="calcularPerimetroCuadrado()">
Calcular el perímetro
</button>
<button type="button" onclick="calcularAreaCuadrado()">
Calcular el área
</button>
</form>
</section>
<section id="SectionTriangulo">
<h2>Calcula el área y perímetro de un triángulo</h2>
<form>
<h3>Escribe cuánto mide cada lado de tu triángulo:</h3>
<label for="InputLadoOne">
Lado 1
</label>
<input id="InputLadoOne" type="number" />
<label for="InputLadoTwo">
Lado 2
</label>
<input id="InputLadoTwo" type="number" />
<label for="InputLadoBasis">
Base
</label>
<input id="InputLadoBasis" type="number" />
<label for="InputLadoHeight">
Altura
</label>
<input id="InputLadoHeight" type="number" />
<button type="button" onclick="calcularPerimetroTriangulo()">
Calcular el perímetro
</button>
<button type="button" onclick="calcularAreaTriangulo()">
Calcular el área
</button>
</form>
</section>
<section id="SectionCirculo">
<h2>Calcula el área y perímetro de un circulo</h2>
<form>
<label for="InputCirculo">
Escribe cuánto mide el radio de tu circulo:
</label>
<input id="InputCirculo" type="number" />
<button type="button" onclick="calcularPerimetroCirculo()">
Calcular el perímetro
</button>
<button type="button" onclick="calcularAreaCirculo()">
Calcular el área
</button>
</form>
</section>
<script src="./figuras.js"></script>
</body>
</html>