-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
167 lines (149 loc) · 8.34 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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>Calculadora</title>
</head>
<body>
<form name="formulario"><br>
<div class="row">
<div class="col-xs-2 col-sm-2 col-md-3 col-lg-4">
<a href="https://creaticjs.github.io/Retos_NataliaArteaga/index.html"
style='display:scroll;position:fixed;bottom:70%;right:80%;'><img
src="https://creaticjs.github.io/Retos_NataliaArteaga/img/reto1.png" width="40%"></a>
<a href="https://creaticjs.github.io/Retos_NataliaArteaga/retoDos/index.html"
style='display:scroll;position:fixed;bottom:55%;right:80%;'><img
src="https://creaticjs.github.io/Retos_NataliaArteaga/img/reto2.png" width="40%"></a>
<a href="https://creaticjs.github.io/Retos_NataliaArteaga/retoTres/index.html"
style='display:scroll;position:fixed;bottom:40%;right:80%;'><img
src="https://creaticjs.github.io/Retos_NataliaArteaga/img/reto3.png" width="40%"></a>
<a href="https://creaticjs.github.io/Retos_NataliaArteaga/retoCuatro/index.html"
style='display:scroll;position:fixed;bottom:25%;right:80%;'><img
src="https://creaticjs.github.io/Retos_NataliaArteaga/img/reto4.png" width="40%"></a>
<a href="https://creaticjs.github.io/Retos_NataliaArteaga/retoCinco/factura.html"
style='display:scroll;position:fixed;bottom:10%;right:80%;'><img
src="https://creaticjs.github.io/Retos_NataliaArteaga/img/reto5.png" width="40%"></a>
</div>
<div class="col-xs-8 col-sm-8 col-md-6 col-lg-4 p-5">
<center>
<h1>CALCULADORA</h1> <BR>
<input type="text" style="background-color:gray" name="texto1">
<br>
<input type="text" style="background-color:gray" name="texto2" value="0">
<br>
<br>
<div class="row">
<div class="col p-0">
<button type="button" value="CE" onclick='document.formulario.texto2.value = "0"'
class="btn-lg btn-danger btn-block ">CE</button>
</div>
<div class="col p-0">
<button type="button" value="C" onclick="reset()"
class="btn-lg btn-danger btn-block ">C</button>
</div>
<div class="col p-0">
<button type="button" value="" onclick="borraruno()"
class="btn-lg btn-danger btn-block ">←</button>
</div>
<div class="col p-0">
<button type="button" value="/" onclick="operador('/')"
class="btn-lg btn-primary btn-block ">/</button>
</div>
</div>
<div class="row">
<div class="col p-0">
<input type="button" onclick="escribir(this.value)" value="7"
class="btn-lg btn-dark btn-block"></button>
</div>
<div class="col p-0">
<input type="button" onclick="escribir(this.value)" value="8"
class="btn-lg btn-dark btn-block"></button>
</div>
<div class="col p-0">
<button type="button" onclick="escribir(this.value)" value="9"
class="btn-lg btn-dark btn-block ">9</button>
</div>
<div class="col p-0">
<button type="button" value="-" onclick="operador('*')"
class="btn-lg btn-primary btn-block ">*</button>
</div>
</div>
<div class="row">
<div class="col p-0">
<input type="button" onclick="escribir(this.value)" value="4"
class="btn-lg btn-dark btn-block"></button>
</div>
<div class="col p-0">
<input type="button" onclick="escribir(this.value)" value="5"
class="btn-lg btn-dark btn-block"></button>
</div>
<div class="col p-0">
<button type="button" onclick="escribir(this.value)" value="6"
class="btn-lg btn-dark btn-block ">6</button>
</div>
<div class="col p-0">
<button type="button" value="*" onclick="operador('-')"
class="btn-lg btn-primary btn-block ">-</button>
</div>
</div>
<div class="row">
<div class="col p-0">
<input type="button" onclick="escribir(this.value)" value="1"
class="btn-lg btn-dark btn-block"></button>
</div>
<div class="col p-0">
<input type="button" onclick="escribir(this.value)" value="2"
class="btn-lg btn-dark btn-block"></button>
</div>
<div class="col p-0">
<button type="button" onclick="escribir(this.value)" value="3"
class="btn-lg btn-dark btn-block ">3</button>
</div>
<div class="col p-0">
<button type="button" value="/" onclick="operador('+')"
class="btn-lg btn-primary btn-block ">+</button>
</div>
</div>
<div class="row">
<div class="col p-0">
<button type="button" onclick="menos()" value="."
class="btn-lg btn-dark btn-block ">±</button>
</div>
<div class="col p-0">
<input type="button" onclick="escribir(this.value)" value="0"
class="btn-lg btn-dark btn-block"></button>
</div>
<div class="col p-0">
<button type="button" onclick="coma()" value="."
class="btn-lg btn-dark btn-block ">.</button>
</div>
<div class="col p-0">
<button type="button" value="/" onclick="calcular()"
class="btn-lg btn-success btn-block ">=</button>
</div>
</div>
</center>
</div>
<div class="col-xs-2 col-sm-2 col-md-3 col-lg-4">
</div>
<br>
</form>
</div>
<br><br>
<script src=calculadora.js>
</script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
</body>
</html>