Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
57 lines (50 loc) · 1.76 KB
/
Copy pathindex.html
File metadata and controls
57 lines (50 loc) · 1.76 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Expense Tracker</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="tracker-container">
<h2>Expense Tracker</h2>
<div class="input-group">
<label for="expenseName">Expense Name:</label>
<input type="text" id="expenseName" placeholder="e.g., Groceries">
</div>
<div class="input-group">
<label for="expenseAmount">Price per Item ($):</label>
<input type="number" id="expenseAmount" min="0" step="0.01" placeholder="0.00">
</div>
<div class="input-group">
<label for="expenseQty">Quantity:</label>
<input type="number" id="expenseQty" min="1" value="1" placeholder="1">
</div>
<button onclick="addExpense()" class="btn-add">Add Expense</button>
<div class="status-bar">
<span>Total Items: <strong id="itemCount">0</strong></span>
</div>
<h3>Expenses List</h3>
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Item Name</th>
<th>Price</th>
<th>Qty</th>
<th>Total</th>
<th>Action</th>
</tr>
</thead>
<tbody id="expenseList">
</tbody>
</table>
</div>
<h3 class="total-display">
Grand Total: $<span id="totalExpenses">0.00</span>
</h3>
</div>
<script src="script.js"></script>
</body>
</html>