-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfiguras.html
101 lines (88 loc) · 3.49 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!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 practico Javascript</title>
<!-- ESTILOS -->
<link rel="stylesheet" href="./css/figure-styles.css" />
<script src="./js/figuras.js"></script>
<!-- FONTS DE GOOGLE -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
</head>
<body>
<header>
<h1>Figuras Geométricas</h1>
<p>Este es el primer taller del curso práctico de Javascript</p>
<h2>Calcula el área y perímetro de un cuadrado</h2>
</header>
<div>
<section class="cuerpo">
<div>
<img src="./img/dark-quadrate_icon-icons.com_54021.png" alt="imagen-cuadrado"><br>
<label for="inputCuadrado">
Escribe cuánto mide cada lado de tú cuadrado
</label>
<input id="inputCuadrado" type="number" />
<button class="primary-button" type="button" onclick="calcularPerimetroCuadrado()">
calcular el perímetro
</button>
<button class="primary-button" type="button" onclick="calcularAreaCuadrado()">
calcular el área
</button>
</div>
<!-- TRIANGULO -->
<div>
<img src="./img/triangle-shape_icon-icons.com_53860.png" alt="imagen-triangulo"><br>
<!-- lado1 -->
<label for="inputLado1Triangulo">
Escribe cuánto mide el lado 1 del triángulo</label
>
<input id="inputLado1Triangulo" type="number" />
<!-- lado 2 -->
<label for="inputLado2Triangulo">
Escribe cuánto mide el lado 2 del triángulo</label
>
<input id="inputLado2Triangulo" type="number" />
<!-- base -->
<label for="inputBaseTriangulo">
Escribe cuánto mide la base del triángulo</label
>
<input id="inputBaseTriangulo" type="number" />
<button class="primary-button" type="button" onclick="calcularPerimetroTriangulo()">
calcular el perímetro
</button>
<!-- CALCULAR EL ÁREA
-->
<label for="inputAlturaTriangulo">
Escribe cuánto mide la altura del triángulo</label
>
<input id="inputAlturaTriangulo" type="number" />
<button class="primary-button" type="button" onclick="calcularAreaTriangulo()">
calcular el área</button
><br />
</div>
<div>
<img src="./img/perfect-circle_icon-icons.com_53928.png" alt="imagen circulo"><br>
<!-- CIRCULO -->
<!-- PRIMERO EL DIAMETRO -->
<label for="inputRadioCirculo">
Escribe cuánto mide el radio del circulo</label
>
<input id="inputRadioCirculo" type="number" />
<button class="primary-button" type="button" onclick="calcularDiametroCirculo()">
calcular el diámetro
</button>
<button class="primary-button" type="button" onclick="calcularPerimetroCirculo()">
calcular el perímetro
</button>
<button class="primary-button" type="button" onclick="calcularAreaCirculo()">
calcular el área
</button>
</div>
</section>
</div>
</body>
</html>