-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalculadora.html
128 lines (120 loc) · 6.22 KB
/
calculadora.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
<!DOCTYPE html>
<html lang="pt-br">
<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">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa"
crossorigin="anonymous"></script>
<title>Calculadora</title>
</head>
<body>
<header>
<div class="container-fluid bg-primary">
<div class="row">
<h1 class="text-center text-white">Calculadora com bootstrap e javascript</h1>
</div>
</div>
</header>
<main>
<div class="container">
<div class="row mt-5 justify-content-center">
<div class="col-3 bg-light rounded border" style="width: 300px;">
<div class="row">
<div class="col mt-3">
<input class="rounded p-3" id="txtDisplay" style="width: 100%;" type="text">
<hr>
</div>
</div>
<div class="row p-2">
<div class="col-3">
<button type="button" id="botaoLimpar" class="btn btn-secondary rounded-circle btn-lg"
style="width: 50px;" value="limpar">C</button>
</div>
<div class="col-3">
<button type="button" id="botaoApagar" class="btn btn-secondary rounded-circle btn-lg"
style="width: 50px;" value="apagar">⇦</button>
</div>
</div>
<div class="row p-2">
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="7">7</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="8">8</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="9">9</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="/">÷</button>
</div>
</div>
<div class="row p-2">
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="6">6</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="5">5</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="4">4</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="*">x</button>
</div>
</div>
<div class="row p-2">
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="1">1</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="2">2</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="3">3</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="-">-</button>
</div>
</div>
<div class="row p-2">
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="0">0</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value=".">.</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="=">=</button>
</div>
<div class="col-3">
<button type="button" class="btn btn-secondary rounded-circle btn-lg" style="width: 50px;"
value="+">+</button>
</div>
</div>
</div>
</div>
</div>
</main>
<script src="script.js"></script>
</body>
</html>