-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex1.html
158 lines (141 loc) · 3.55 KB
/
index1.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<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>Simple Interest Calculator</title>
</head>
<style>
*{
/* user-select: none; */
margin: 0;
padding: 0;
font-family: sans-serif;
box-sizing: border-box;
text-decoration: none;
}
body{
display: grid;
height: 100vh;
width: 100%;
place-items: center;
background-image: url('img2.jpg ') ;
}
.topnav {
overflow: hidden;
background-color: #333;
}
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #ddd;
color: black;
}
.topnav a.active {
background-color: #04AA6D;
color: white;
}
.container
{
text-align: center;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(214, 202, 202, 0.05);
height: 52vh;
width: 28vw;
background: radial-gradient(at center, rgba(214, 202, 202, 0.05), rgba(224, 217, 217, 0.5));
margin-top: 20px;
}
.container h1
{
margin: 10px;
background-color: black;
color: white;
}
.inpSection{
margin: 20px 50px;
text-align: left;
}
input{
color: rgba(51, 45, 45, 0.5);
font-weight: 650;
outline: none;
border: none;
box-shadow: 0 2px 4px rgba(214, 202, 202, 0.05);
font-size: 18px;
padding: 15px;
height: 35px;
margin: 10px;
display: flex;
width: 20vw;
}
.button button{
padding: 10px;
margin: 30px 110px;
font-size: 18px;
font-weight: 650;
cursor: pointer;
border: none;
outline: none;
box-shadow: 0 2px 4px rgba(224, 217, 217, 0.5);
border-radius: 5px;
}
.result{
position: relative;
margin: 20px 0;
}
label{
font-weight: 600;
}
h3{
font-size: 20px;
}
</style>
<body>
<div class="topnav">
<a href="index.html">Calculator</a>
<a class="active" href="index1.html">Simple Interest Calculator</a>
<a href="index2.html">Compound Interest Calculator</a>
</div>
<div class="container">
<h1>Simple Interest Calculator</h1>
<div class="inpSection">
<div class="amt">
<label for="amount">Enter Total Amount: </label>
<input type="number" name="amount" id="amount" placeholder="Enter Total Amount">
</div>
<div class="time">
<label for="time">Enter Time: </label>
<input type="number" name="time" id="time" placeholder="Enter Time">
</div>
<div class="rate">
<label for="rate">Rate: </label>
<input type="number" name="rate" id="rate" placeholder="Enter Rate">
</div>
<div class="button">
<button onclick="Calculate()">Calculate</button>
</div>
<div class="result">
<h3 id="si"></h3>
</div>
</div>
</div>
<script>
function Calculate()
{
let p=document.getElementById('amount').value;
let t=document.getElementById('time').value;
let r=document.getElementById('rate').value;
let SI=(p*t*r)/100;
document.getElementById('si').innerHTML="The Total Simple Interest Is: "+SI;
}
</script>
</body>
</html>