-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRent__bil.html
More file actions
107 lines (90 loc) · 2.6 KB
/
Rent__bil.html
File metadata and controls
107 lines (90 loc) · 2.6 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rent and Bill Payment</title>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #f8f8f8;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.container {
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
overflow: hidden;
width: 300px;
}
header {
background-color: #4caf50;
color: #fff;
text-align: center;
padding: 15px;
}
form {
padding: 20px;
box-sizing: border-box;
}
label {
display: block;
margin-bottom: 8px;
color: #555;
}
input {
width: 100%;
padding: 10px;
margin-bottom: 16px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
background-color: #4caf50;
color: #fff;
padding: 12px;
border: none;
border-radius: 4px;
cursor: pointer;
width: 100%;
}
button:hover {
background-color: #45a049;
}
#output {
margin-top: 20px;
font-weight: bold;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<header>
<h2>Rent and Bill Payment</h2>
</header>
<form id="rentForm">
<label for="houseRent">Rent for House:</label>
<input type="number" id="houseRent" required>
<label for="months">Number of Months:</label>
<input type="number" id="months" required>
<button type="button" onclick="calculateVoucher()">Calculate Voucher</button>
</form>
<div id="output"></div>
</div>
<script>
function calculateVoucher() {
const houseRent = parseFloat(document.getElementById('houseRent').value);
const months = parseInt(document.getElementById('months').value);
const totalAmount = houseRent * months;
const voucherMessage = `Congratulations! You've paid a total of $${totalAmount.toFixed(2)} for the next ${months} months. Your voucher is on the way!`;
document.getElementById('output').innerText = voucherMessage;
}
</script>
</body>
</html>