38 lines
1006 B
HTML
38 lines
1006 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Purchase Tracker</title>
|
|
|
|
<!-- Link CSS -->
|
|
<link rel="stylesheet" href="styles.css" />
|
|
|
|
<!-- Link JS (corrected attribute typo: 'data-jslicence' to 'data-jslicense') -->
|
|
<script src="app.js" defer data-jslicense="MIT"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<h1>Product Purchase Tracker</h1>
|
|
|
|
<!-- Purchase form -->
|
|
<form id="purchaseForm">
|
|
<label for="product">Product Name:</label>
|
|
<input type="text" id="product" name="product" required />
|
|
|
|
<label for="price">Price (₹):</label>
|
|
<input type="number" id="price" name="price" step="0.01" required />
|
|
|
|
<button type="submit">Add Purchase</button>
|
|
</form>
|
|
|
|
<!-- Button to fetch total -->
|
|
<button id="totalBtn">Show Total Profit</button>
|
|
|
|
<!-- Result will be shown here -->
|
|
<div id="result"></div>
|
|
</div>
|
|
</body>
|
|
</html>
|