-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
96 lines (71 loc) · 3.04 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
<!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">
<link rel="stylesheet" href="style.css">
<title>Personal Finance</title>
</head>
<body>
<h1>Personal Finance</h1>
<section class="finance-part">
<div class="finance-image">
<img src="./img/finance.jpg" alt="A financial Planning Image">
</div>
<div class="finance-calculation">
<h2>Income</h2>
<div class="input-box">
<span>Income:</span>
<input id="income-input" type="number" value="10000">
</div>
<p class="error" id="income-error">Income can't be Negative or blank</p>
<h2>Expenses</h2>
<div class="input-box">
<span>Food:</span>
<input id="food-input" type="number" value="3000">
</div>
<p class="error" id="food-error">Food Expense can't be Negative or blank</p>
<div class="input-box">
<span>Rent:</span>
<input id="rent-input" type="number" value="2000">
</div>
<p class="error" id="rent-error">Rent Expense can't be Negative or blank</p>
<div class="input-box">
<span>Clothes:</span>
<input id="clothes-input" type="number" value="500">
</div>
<p class="error" id="clothes-error">Clothes Expense can't be Negative or blank</p>
<!-- <p class="error" id="error-negative-value">Expenses Can't be negative</p> -->
<button id="calculate-btn">Calculate</button>
<div class="result-line">
<span>Total Expenses:</span>
<span id="total-expenses" class="highlighted-color"> 5500</span>
<p class="error" id="error-expenses">Total Expenses Exceeds the Income</p>
</div>
<div class="result-line">
<span>Balance:</span>
<span id="balance" class="highlighted-color"> 4500</span>
</div>
<hr>
<div class="save">
<span>Save:</span>
<input id="save-input" type="number" value="20">
<span>%</span>
<button id="save-btn">Save</button>
</div>
<p class="error" id="save-error">Save input can't be Negative or blank</p>
<div class="result-line">
<span>Saving Amount:</span>
<span id="saving-amount" class="highlighted-color"> 2000</span>
</div>
<p class="error" id="saving-error">You can't save this amount. Please reduce the Percentage. </p>
<div class="result-line">
<span>Remaining Balance:</span>
<span id="remaining-balance" class="highlighted-color"> 2500</span>
</div>
</div>
</section>
<script src="personal-finance.js"></script>
</body>
</html>