New code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bank Account Withdrawal</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}
h2 {
color: #333;
text-align: center;
margin-top: 30px;
}
.container {
width: 50%;
margin: 0 auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
label {
font-weight: bold;
}
input[type="number"] {
width: 100%;
padding: 8px;
margin: 5px 0;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
padding: 10px 20px;
margin-top: 10px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
#result {
margin-top: 20px;
padding: 10px;
border-radius: 4px;
background-color: #f0f0f0;
}
</style>
</head>
<body>
<h2>Bank Account Withdrawal</h2>
<div class="container">
<div>
<label for="balance">Account Balance:</label>
<input type="number" id="balance" placeholder="Enter account balance" value="10000">
</div>
<div>
<label for="amount">Withdrawal Amount:</label>
<input type="number" id="amount" placeholder="Enter withdrawal amount">
</div>
<button onclick="withdraw()">Withdraw</button>
<button onclick="checkBalance()">Check Balance</button>