-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCompoundInterestCalc.html
68 lines (63 loc) · 1.61 KB
/
CompoundInterestCalc.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="Brandon Monroe">
<title>Compound Interest</title>
<script src="compoundInterest.js">
</script>
<style>
.table{
display: table;
}
.row{
display: table-row;
}
.row > *{
display: table-cell;
}
.table{
border-spacing: 0 3px;
}
.row>first-child{
text-align: right;
padding-right: 10px;
}
table{
text-align: center;
}
table,th,td{
border: none;
}
th{
background-color: midnightblue;
color: white;
padding: 10px;
}
td{
background-color: mistyrose;
}
</style>
</head>
<body>
<h3>Compound Interest Calculator</h3>
<form class="table" id="input">
<div class="row">
<label for="deposit">Initial Deposit:</label>
<input type="number" id="deposit" min="1" max="9999" step="1" required>
</div>
<div class="row">
<label for="rate">Annual Interest Rate:</label>
<input type="number" id="rate" min="0" max="100" step=".1" required>
</div>
<div class="row">
<label for="years">Years to Grow:</label>
<input type="number" id="years" min="1" max="20" step="1" required>
</div>
</form>
<br>
<input type="button" form="input" value="Generate Compound Interest" onclick="generateTable(this.form);">
<br><br>
<div id="result"></div>
</body>
</html>