-
Notifications
You must be signed in to change notification settings - Fork 0
/
OIB-Task1.html
48 lines (47 loc) · 3.19 KB
/
OIB-Task1.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Calculator</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="OIB-Task1.css">
</head>
<body>
<section class="main_class">
<table class="table1">
<tr>
<td colspan="5" style="padding-bottom: 10px;" ><input type="text" name="entry box" id="t3" value="" style="font-size:25px;" size="14"></td>
</tr>
<tr id="t1">
<td ><input type="button" value="(" id="t2" onclick="t3.value+='(' " style="background-color: rgb(247, 247, 174);color: black;"></td>
<td ><input type="button" value=")" id="t2" onclick="t3.value+=')' " style="background-color: rgb(247, 247, 174);color: black;"></td>
<td ><input type="button" value="/" id="t2" onclick="t3.value+='/' " style="background-color: rgb(247, 247, 174);color: black;"></td>
<td ><input type="button" value="-" id="t2" onclick="t3.value+='-' " style="background-color: rgb(247, 247, 174);color: black;"></td>
</tr>
<tr id="t1">
<td ><input type="button" value="7" id="t2" onclick="t3.value+='7' "></td>
<td ><input type="button" value="8" id="t2" onclick="t3.value+='8' "></td>
<td ><input type="button" value="9" id="t2" onclick="t3.value+='9' "></td>
<td ><input type="button" value="%" id="t2" style="padding-right: 25px;background-color: rgb(247, 247, 174);color: black;"" onclick="t3.value+='%' " ></td>
</tr>
<tr id="t1">
<td ><input type="button" value="4" id="t2" onclick="t3.value+='4' "></td>
<td ><input type="button" value="5" id="t2" onclick="t3.value+='5' "></td>
<td ><input type="button" value="6" id="t2" onclick="t3.value+='6' "></td>
<td ><input type="button" value="*" id="t2" style="padding-right: 31px;background-color: rgb(247, 247, 174);color: black;" onclick="t3.value+='*' " ></td>
</tr>
<tr id="t1">
<td ><input type="button" value="1" id="t2" onclick="t3.value+='1' "></td>
<td ><input type="button" value="2" id="t2" onclick="t3.value+='2' "></td>
<td ><input type="button" value="3" id="t2" onclick="t3.value+='3' "></td>
<td ><input type="button" value="+" id="t2" onclick="t3.value+='+' " style="background-color: rgb(247, 247, 174);color: black;"></td>
</tr>
<tr id="t1">
<td ><input type="button" value="." id="t2" style="padding-right: 33px;" onclick="t3.value+='.' "></td>
<td ><input type="button" value="0" id="t2" onclick="t3.value+='0' "></td>
<td><input type="button" value="c" id="t2" onclick="t3.value='' "></td>
<td><input type="button" value="="id="t2" style="background-color: rgb(247, 247, 174);color: black;" onclick="t3.value=eval(t3.value)"></td>
</tr>
</table>
</section>
</body>
</html>