-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
97 lines (80 loc) · 2.4 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>loan-calculator</title>
</head>
<style>
*{
margin: 0;
padding: 0;
}
#loancal{
margin-top: 200px;
margin-left: 20px;
padding-top: 20px;
text-align: center;
border-bottom: 5px solid black;
border-top: 3px solid black;
border-radius: 50px;
z-index: 1;
}
h1{
color: #FF0033;
}
#payment{
color: #bfff00;
background-color: black;
border-bottom: 5px solid black;
border-top: 3px solid black;
border-radius: 50px;
text-align: center;
justify-content: center;
}
#loancal p{
padding: 10px;
}
#loancal::before{
content: "";
background:url(bg1.jpg) no-repeat center/cover;
height: 100%;
width: 100%;
position: absolute;
top: 0px;
left: 0px;
z-index: -1;
opacity: 0.79 ;
}
.link{
color: #0000FF;
text-decoration: none;
text-align: center;
justify-content: center;
margin-left: 20px;
}
</style>
<body>
<div id="loancal">
<h1>LOAN CALCULATOR</h1>
<p>LOAN AMOUNT:₹<input id="amount" type="number" onchange="computeLoan()"></p>
<p>INTEREST RATE:%<input id="interest" type="number" min="1" max="100" value="3" step=".1" onchange="computeLoan()"></p>
<p>MONTHS TO PAY:<input id="months" type="number" min="1" max="300" value="1" step="1" onchange="computeLoan()"></p>
<h2 id="payment"></h2>
</div>
<footer class="link">
<h1 class="link">IF YOU LIKE MY WORK <a class="link" href="https://www.linkedin.com/in/yash-sharma-16634a202/"> CLICK</a> HERE</h1>
</footer>
<script>
function computeLoan(){
var amount=document.getElementById('amount').value;
var interest=document.getElementById('interest').value;
var months=document.getElementById('months').value;
var value= (amount*(interest*.01))/months;
var payment=((amount/months)+value).toFixed(2);
document.getElementById('payment').innerHTML ="monthly payment= ₹ "+payment;
}
</script>
</body>
</html>