-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
40 lines (39 loc) · 1.65 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 name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple JavaScript Calculator</title>
</head>
<body>
<h2>Simple JavaScript Calculator</h2>
<p>
<form name="form1">
<input type="text" name="text1" value="" size=36>
<table>
<tr>
<td><input type="button" value="7" onclick="calc('7')">
<td><input type="button" value="8" onclick="calc('8')">
<td><input type="button" value="9" onclick="calc('9')">
<td><input type="button" value="*" onclick="calc('*')">
<tr>
<td><input type="button" value="4" onclick="calc('4')">
<td><input type="button" value="5" onclick="calc('5')">
<td><input type="button" value="6" onclick="calc('6')">
<td><input type="button" value="/" onclick="calc('/')">
<tr>
<td><input type="button" value="1" onclick="calc('1')">
<td><input type="button" value="2" onclick="calc('2')">
<td><input type="button" value="3" onclick="calc('3')">
<td><input type="button" value="-" onclick="calc('-')">
<tr>
<td><input type="button" value="0" onclick="calc('0')">
<td><input type="button" value="C" onclick="calc('C')">
<td><input type="button" value="=" onclick="calc('=')">
<td><input type="button" value="+" onclick="calc('+')">
</table>
</form>
</p>
<script src="script.js"></script>
</body>
</html>