-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (58 loc) · 1.95 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We"
crossorigin="anonymous"
/>
<title>Calculadora</title>
</head>
<body>
<div class="container">
<h1>Calculadora</h1>
<p>
¡Bienvenido! A continuación, ingrese dos operandos y la operación a
realizar para obtener su resultado.
</p>
<form id="forma">
<div class="mb-3">
<!--Margin button 3-->
<label for="operandoA">Operando A</label>
<input
type="number"
class="form-control"
placeholder="Ingrese operando A"
id="operandoA"
/>
</div>
<div class="mb-3">
<label for="operandoB">Operando B</label>
<input
type="number"
class="form-control"
placeholder="Ingrese operando B"
id="operandoB"
/>
</div>
</form>
<!--El button debe estar por fuera del form y sin type='submit' porque no está en un form-->
<button class="btn btn-primary mb-3" onclick="sumar()">Sumar</button>
<button class="btn btn-primary mb-3" onclick="restar()">Restar</button>
<button class="btn btn-primary mb-3" onclick="dividir()">Dividir</button>
<button class="btn btn-primary mb-3" onclick="multiplicar()">
Multiplicar
</button>
<div id="resultado"></div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj"
crossorigin="anonymous"
></script>
<script src="js/app.js"></script>
</body>
</html>