BANK ATM application program in JAVASCRIPT that allows the u
BANK ATM application program in JAVASCRIPT, that allows the user to manage transaction data. Make sure it produces tabular feedback to the user. Program reads input from the user though the web page, and generates output, without any errors
Solution
<form action=\"\" >
<table>
<tr>
<td>
<input type=\"button\" value=\"$20\" onclick=\'accept())\'/> // you have an extra closing brace here
</td>
<td>
</td>
<td>
</td>
<td>
<input type=\"button\" value=\"Withdrawal\" onclick=\'\'/>
</td>
</tr>
<tr>
<td>
<input type=\"button\" value=\"$60\" onclick=\'accept()\'/>
</td>
<td>Current Balance
</td>
<td>
<input type=\"Current Balance\" value=\"5000.00\" onchange=\'\'/> //Current balance is not a valid type
</td>
<td>
</td>
</tr>
<tr>
<td>
<input type=\"button\" value=\"$100\" onclick=\'accept()\'/>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
<input type=\"button\" value=\"Other Amount\" onclick=\'\'/>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
<script type=\"text/javascript\">
var balance=50000;
function withdraw(amount)
var sure = confirm(\"Are You Sure You Want To Withdraw This Amount?\");
if(true) //should be if (sure)
{
balance = balance - amount;
}
Else
{
alert(\"No Withdrawal Made\");
}
alert(\"Your Balance Is \"+balance);
function
</script>


