-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
51 lines (45 loc) · 1.84 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div><input type="text" placeholder="0" id="input" ></div>
<div>
<button onclick="s='';
document.querySelector('#input').value=s;
" style="background-color: rgb(222, 205, 240); color: rgb(113, 35, 187);">C</button>
<button onclick="delchar()" class="operators">del</button>
<button onclick="add('**')" class="operators">^</button>
<button onclick="add('/')" class="operators">/</button>
</div>
<div>
<button onclick="add('7')" class="number">7</button>
<button onclick="add('8')" class="number">8</button>
<button onclick="add('9')" class="number">9</button>
<button onclick="add('*')" class="operators">x</button>
</div>
<div>
<button onclick="add('4')" class="number">4</button>
<button onclick="add('5')" class="number">5</button>
<button onclick="add('6')" class="number">6</button>
<button onclick="add('-')" class="operators">-</button>
</div>
<div>
<button onclick="add('1')" class="number">1</button>
<button onclick="add('2')" class="number">2</button>
<button onclick="add('3')" class="number">3</button>
<button onclick="add('+')" class="operators">+</button>
</div>
<div>
<button onclick="add('00')" class="operators">00</button>
<button onclick="add('0')" class="number">0</button>
<button onclick="add('.')" class="operators">.</button>
<button onclick="calculate()" style="background-color: rgb(222, 205, 240); color: rgb(113, 35, 187);">=</button>
</div>
<script src="calc.js"></script>
</body>
</html>