-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
62 lines (59 loc) · 2.07 KB
/
index.html
File metadata and controls
62 lines (59 loc) · 2.07 KB
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
53
54
55
56
57
58
59
60
61
62
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Webpack 2 Basics</title>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css"/>
<style>
.container {
margin: 50px;
}
.btn {
margin-top: 25px;
}
</style>
<script src="dist/bundle.js" type="text/javascript"></script>
<script>
function calculateValue(){
var operand1 = document.getElementById('operand1').value;
var operand2 = document.getElementById('operand2').value;
var operator = document.getElementById('operator').value;
var result = calc.calculate(operand1, operand2, operator);
document.getElementById("result").value = result;
}
</script>
</head>
<body>
<div class="container">
<div class="form-group row">
<div class="col-xs-2">
<label for="operand1">Operand-1</label>
<input class="form-control" id="operand1" type="number">
</div>
<div class="col-xs-2">
<label for="operand2">Operand-2</label>
<input class="form-control" id="operand2" type="number">
</div>
<div class="col-xs-1">
<label for="operator">Operator</label>
<select id="operator" class="form-control" required>
<option value="+">+</option>
<option value="-">-</option>
<option value="*">*</option>
<option value="/">/</option>
</select>
</div>
<div class="col-xs-1">
<button type="button" onclick="calculateValue()" class="btn btn-info">Calculate</button>
</div>
<div class="col-xs-4">
<label for="result">Result: </label>
<input class="form-control" id="result" type="text">
</div>
</div>
</div>
</body>
</html>