-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (46 loc) · 2.2 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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>Kalkulator</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="calculator.js"></script>
<script type="text/javascript" src="keyboard.js"></script>
</head>
<body>
<div id="calculator">
<div id="display">
<div id="history">0</div>
<div id="current">0</div>
</div>
<button class="actionButton">U</button>
<button class="actionButton">U</button>
<button class="actionButton">U</button>
<button class="actionButton" onclick="reset()">C</button>
<button class="actionButton" onclick="pop()">✗</button>
<br />
<button class="actionButton" onclick="push(7)">7</button>
<button class="actionButton" onclick="push(8)">8</button>
<button class="actionButton" onclick="push(9)">9</button>
<button class="actionButton" onclick="addOperation('^')">x<sup>y</sup></button>
<button class="actionButton" onclick="addOperation('sqrt')">√x</button>
<br />
<button class="actionButton" onclick="push(4)">4</button>
<button class="actionButton" onclick="push(5)">5</button>
<button class="actionButton" onclick="push(6)">6</button>
<button class="actionButton" onclick="addOperation('*')">×</button>
<button class="actionButton" onclick="addOperation('/')">÷</button>
<br />
<button class="actionButton" onclick="push(1)">1</button>
<button class="actionButton" onclick="push(2)">2</button>
<button class="actionButton" onclick="push(3)">3</button>
<button class="actionButton" onclick="addOperation('-')">−</button>
<button class="actionButton" id="plusButton" onclick="addOperation('+')">+</button>
<br />
<button class="actionButton" onclick="changeSign()">±</button>
<button class="actionButton" onclick="push(0)">0</button>
<button class="actionButton" onclick="push('.')">.</button>
<button class="actionButton" onclick="calc()">=</button>
</div>
</body>
</html>