-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclickToAddItems.html
52 lines (52 loc) · 1.72 KB
/
clickToAddItems.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
52
<!DOCTYPE html>
<html>
<head>
<script type="text/JavaScript" src="clickToAddItems.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
rel="stylesheet" type="text/css" />
</head>
<body>
<div class="container">
<h1>Click to Add Items</h1>
<form name="numberFun" onsubmit="return validateItems();"
onreset="resetForm();" class="form-inline">
<div class="form-group">
<label for="num1">Num1</label>
<input type="number" class="form-control" id="num1">
</div>
<div class="form-group">
<label for="num2">Num2</label>
<input type="number" class="form-control" id="num2">
</div>
<button type="submit" id="submitButton" class="btn btn-default">Submit</button>
<button type="reset" id="resetButton" class="btn">Reset</button>
</form>
<table id="results" class="table table-striped" style="display:none;">
<thead>
<tr>
<th>Operation</th>
<th>Result</th>
</tr>
</thead>
<tbody>
<tr>
<td>Addition (+)</td>
<td><span id="addResult"></span></td>
</tr>
<tr>
<td>Subtraction (-)</td>
<td><span id="subtractResult"></span></td>
</tr>
<tr>
<td>Multiplication (*)</td>
<td><span id="multiplyResult"></span></td>
</tr>
<tr>
<td>Division (/)</td>
<td><span id="divideResult"></span></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>