meezan
Sat Feb 10 2024 21:09:11 GMT+0000 (Coordinated Universal Time)
Saved by
@ahmad_raza
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Monthly Profile Calculator</title>
</head>
<body>
<label for="totalInput">Total Input Value:</label>
<input type="number" id="totalInput" placeholder="Enter total input value">
<button onclick="calculateMonthlyProfile()">Calculate Monthly Profile</button>
<p id="result"></p>
<script>
function calculateMonthlyProfile() {
const totalInputValue = parseFloat(document.getElementById('totalInput').value);
if (isNaN(totalInputValue)) {
alert("Please enter a valid number for the total input value.");
return;
}
const profileBefore30Percent = totalInputValue * 0.18;
const remainingAmount = profileBefore30Percent - (profileBefore30Percent * 0.3);
const monthlyProfile = remainingAmount / 12;
document.getElementById('result').innerHTML = `Monthly Profile: $${monthlyProfile.toFixed(2)}`;
}
</script>
</body>
</html>
content_copyCOPY
Comments