-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
90 lines (80 loc) · 3.94 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Income Expense Calculator</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;300;400;500;600;700;800;900&family=Noto+Sans&family=Nunito+Sans&family=Poppins:wght@500&family=Roboto&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</head>
<body class="bg-dark">
<main>
<div class="container">
<h1>Budget Calculator</h1>
<div class="row">
<div class="col">
<h3>Income</h3>
<br>
<form action="" id="formIncome">
<select name="incomeSrc" id="incomeSrc">
<option value="Salary">Salary</option>
<option value="Investment">Investment</option>
<option value="other">Other</option>
</select>
<input type="number" id="incomeAmt" placeholder="amount (in Rupees)">
<br><br>
<input type="button" class="btn btn-outline-success px-1" id="submitIncome" value="Calculate">
</form>
</div>
<div class="col">
<h3>Expense</h3>
<br>
<form action="" id="formExpense" method="get">
<select name="expenseSrc" id="expenseSrc">
<option value="Rent">Rent</option>
<option value="food">Food</option>
<option value="other">Other</option>
</select>
<input type="number" id="expenseAmt" placeholder="amount (in Rupees)">
<br><br>
<input class="btn btn-outline-success px-1" type="button" id="submitExpense" value="Calculate">
</form>
</div>
</div>
<div class="row">
<div class="col-6">
<table id="tableIncome" class="table">
<tbody class="text-white">
<tr class="bg-success">
<th>Income</th>
<th>Amount</th>
</tr>
</tbody>
</table>
<h3 id="totalIncome"></h3>
</div>
<div class="col-6">
<table id="tableExpense" class="table">
<tbody class="text-white">
<tr class="bg-danger">
<th>Expense</th>
<th>Amount</th>
</tr>
</tbody>
</table>
<h3 id="totalExpense"></h3>
</div>
</div>
<div class="row">
<canvas id="myChart" style="width:100%;"></canvas>
</div>
</div>
</main>
<script src="incomeCal.js"></script>
</body>
</html>