-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
40 lines (39 loc) · 1.9 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
<!DOCTYPE html>
<html lang="en">
<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" />
<title>Calculator</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">
<form action="" class="calculator" name="calc">
<input type="text" class="value" readonly name="txt" />
<span class="num clear" onclick="calc.txt.value = ''"><i>C</i></span>
<span class="num" onclick="calc.txt.value += '/'"><i>/</i></span>
<span class="num" onclick="calc.txt.value += '*'"><i>*</i></span>
<span class="num" onclick="calc.txt.value += '7'"><i>7</i></span>
<span class="num" onclick="calc.txt.value += '8'"><i>8</i></span>
<span class="num" onclick="calc.txt.value += '9'"><i>9</i></span>
<span class="num" onclick="calc.txt.value += '-'"><i>-</i></span>
<span class="num" onclick="calc.txt.value += '4'"><i>4</i></span>
<span class="num" onclick="calc.txt.value += '5'"><i>5</i></span>
<span class="num" onclick="calc.txt.value += '6'"><i>6</i></span>
<span class="num plus" onclick="calc.txt.value += '+'"><i>+</i></span>
<span class="num" onclick="calc.txt.value += '1'"><i>1</i></span>
<span class="num" onclick="calc.txt.value += '2'"><i>2</i></span>
<span class="num" onclick="calc.txt.value += '3'"><i>3</i></span>
<span class="num" onclick="calc.txt.value += '0'"><i>0</i></span>
<span class="num" onclick="calc.txt.value += '00'"><i>00</i></span>
<span class="num" onclick="calc.txt.value += '.'"><i>.</i></span>
<span
class="num equal"
onclick="document.calc.txt.value=eval(calc.txt.value)"
><i>=</i></span
>
</form>
</div>
</body>
</html>