-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
95 lines (95 loc) · 4.42 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>JavaScript Calculator</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='css/estilos.css'>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bungee&family=Jaro:opsz@6..72&display=swap" rel="stylesheet">
<script src='js/main.js'></script>
</head>
<body>
<div class="container">
<h1>JavaScript Calculator</h1>
<table id="calculadora">
<tr>
<td colspan="5" class="contenedorPantalla">
<input class="pantalla" type="text" id="valores" value="0" readonly/>
</td>
</tr>
<tr id="teclado">
<td>
<input class="numeros" type="button" id="7" value="7" onclick="introducirNumero('7')"/>
</td>
<td>
<input class="numeros" type="button" id="8" value="8" onclick="introducirNumero('8')"/>
</td>
<td>
<input class="numeros" type="button" id="9" value="9" onclick="introducirNumero('9')"/>
</td>
<td colspan="2">
<input class="operaciones" type="button" id="potencia" value="Exp" onclick="realizarOperacion('^')"/>
</td>
</tr>
<tr id="teclado">
<td>
<input class="numeros" type="button" id="4" value="4" onclick="introducirNumero('4')"/>
</td>
<td>
<input class="numeros" type="button" id="5" value="5" onclick="introducirNumero('5')"/>
</td>
<td>
<input class="numeros" type="button" id="6" value="6" onclick="introducirNumero('6')"/>
</td>
<td>
<input class="operaciones" type="button" id="producto" value="x" onclick="realizarOperacion('x')"/>
</td>
<td>
<input class="operaciones" type="button" id="division" value="/" onclick="realizarOperacion('/')"/>
</td>
</tr>
<tr id="teclado">
<td>
<input class="numeros" type="button" id="1" value="1" onclick="introducirNumero('1')"/>
</td>
<td>
<input class="numeros" type="button" id="2" value="2" onclick="introducirNumero('2')"/>
</td>
<td>
<input class="numeros" type="button" id="3" value="3" onclick="introducirNumero('3')"/>
</td>
<td>
<input class="operaciones" type="button" id="suma" value="+" onclick="realizarOperacion('+')"/>
</td>
<td>
<input class="operaciones" type="button" id="resta" value="-" onclick="realizarOperacion('-')"/>
</td>
</tr>
<tr id="teclado">
<td>
<input class="numeros" type="button" id="0" value="0" onclick="introducirNumero('0')"/>
</td>
<td>
<input class="operaciones" type="button" id="," value="." onclick="introducirComa()"/>
</td>
<td>
<input class="operaciones" type="button" id="ac" value="C" onclick="resetearPantalla()"/>
</td>
<td colspan="2">
<input class="operaciones" type="button" id="igual" value="=" onclick="resolverOperacion()"/>
</td>
</tr>
</table>
</div>
</body>
</html>