-
Notifications
You must be signed in to change notification settings - Fork 0
/
calculator.html
50 lines (49 loc) · 2.04 KB
/
calculator.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
<html>
<head>
<meta charset="utf-8" />
<title>EPAM CALCULATOR</title>
<style type="text/css">
body{background-color:crimson;}
#calculator * {font-size: 16px;}
#calculator table {border: solid 3px silver; border-spacing: 5px; background-color: blueviolet; }
#calculator table td {border-spacing: 3px;}
input.display {width: 266px; text-align: right;}
td.buttons {border-top: solid 3px red;}
input[type= button] {width: 50px; height: 40px; border-left: 10px;}
</style>
</head>
<body>
<form name="calc" id="calculator">
<table>
<tr>
<td>
<input type="text" name="input" size="16" class="display">
</td>
</tr>
<tr>
<td class="buttons">
<input type="button" name="odyn" value="1" OnClick="calc.input.value += '1'">
<input type="button" name="dva" value="2" OnClick="calc.input.value += '2'">
<input type="button" name="try" value="3" OnClick="calc.input.value += '3'">
<input type="button" name="dodaty" value="+" OnClick="calc.input.value += '+'">
<br>
<input type="button" name="4otyry" value="4" OnClick="calc.input.value += '4'">
<input type="button" name="piat" value="5" OnClick="calc.input.value += '5'">
<input type="button" name="shist" value="6" OnClick="calc.input.value += '6'">
<input type="button" name="vidnyaty" value="-" OnClick="calc.input.value += '-'">
<br>
<input type="button" name="sim" value="7" OnClick="calc.input.value += '7'">
<input type="button" name="visim" value="8" OnClick="calc.input.value += '8'">
<input type="button" name="deviat" value="9" OnClick="calc.input.value += '9'">
<input type="button" name="pomnozhyty" value="x" OnClick="calc.input.value += '*'">
<br>
<input type="button" name="o4ystyty" value="c" OnClick="calc.input.value = ''">
<input type="button" name="nul" value="0" OnClick="calc.input.value += '0'">
<input type="button" name="dorivnue" value="=" OnClick="calc.input.value = eval(calc.input.value)">
<input type="button" name="podilyty" value="/" OnClick="calc.input.value += '/'">
</td>
</tr>
</table>
</form>
</body>
</html>