-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (38 loc) · 2.45 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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Calculadora</title>
</head>
<body>
<div class="main">
<form action="" name="Calculator">
<input type="text" class="text num-button" name="text1" placeholder="0" disabled>
<input type="text" class="text1 num-button" name="text12" value="AC" onclick="location.reload()"> <!--location.reload() -> é chamada, reiniciando do zero-->
<br>
<input type="button" class="num-button" name="btn7" value="7" onclick="displaynum(btn7.value)">
<input type="button" class="num-button" name="btn8" value="8" onclick="displaynum(btn8.value)">
<input type="button" class="num-button" name="btn9" value="9" onclick="displaynum(btn9.value)">
<input type="button" class="num-button blu" name="divbtn" value="/" onclick="displaynum(divbtn.value)">
<br>
<input type="button" class="num-button" name="btn4" value="4" onclick="displaynum(btn4.value)">
<input type="button" class="num-button" name="btn5" value="5" onclick="displaynum(btn5.value)">
<input type="button" class="num-button" name="btn6" value="6" onclick="displaynum(btn6.value)">
<input type="button" class="num-button bro" name="multbtn" value="*" onclick="displaynum(multbtn.value)">
<br>
<input type="button" class="num-button" name="btn1" value="1" onclick="displaynum(btn1.value)">
<input type="button" class="num-button" name="btn2" value="2" onclick="displaynum(btn2.value)">
<input type="button" class="num-button" name="btn3" value="3" onclick="displaynum(btn3.value)">
<input type="button" class="num-button viol" name="subbtn" value="-" onclick="displaynum(subbtn.value)">
<br>
<input type="button" class="num-button" name="pont" value="." onclick="displaynum(pont.value)">
<input type="button" class="num-button" name="btn0" value="0" onclick="displaynum(btn0.value)">
<input type="button" class="num-button red" name="eqlbtn" value="=" onclick="text1.value=eval(text1.value)">
<input type="button" class="num-button gre" name="maisbtn" value="+" onclick="displaynum(maisbtn.value)">
</form>
</div>
</body>
<script src="script.js"></script>
</html>