-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
49 lines (47 loc) · 2.33 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
41
42
43
44
45
46
47
48
49
<!--Written by Asutosh Variar, 2021-->
<!DOCTYPE html>
<html>
<!--Head used to add CSS and JS to webpage-->
<head>
<title>Web App - Simple Interest Calculator</title>
<script src="script.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<!--onload function used to show value immediately-->
<body onload="ratedisp.value = parseFloat(rate.value).toFixed(2) + '%'">
<!--ID given to div for common features-->
<div id="calc">
<!--Heading-->
<h1>Simple Interest Calculator</h1>
<!--Input fields and text-->
<br> <span class=text style="margin-bottom: 1px">Amount</span> <input type="number" id="principal"> </br>
<br> <span class="text">Interest Rate</span> <input type="range" min="1" max="20" step="0.25" id="rate" oninput="updateRate()"> <output id="ratedisp"></output> </br>
<br> <span class="text">No. of Years</span>
<!--Used to select years; could be futher improved with JQuery-->
<select id="numList">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
</select>
</br>
<!--Button for submitting variables and calling compute() function-->
<button onclick="compute()">Compute Interest</button>
<!--Result div, filled in through script-->
<div id="result" class="text"></div>
<!--Copyright text-->
<p style="text-align:left; padding-left: 15px; padding-bottom: 4%;"><span style="font-size: 22px; vertical-align: -2px">©</span> Everyone Can Get Rich</p>
</div>
</body>
</html>