Dear Experts
I have following codes
<html>
<head>
<title>this is first math exercise within Java Script</title>
<script lanuage="Javascript">
function total()
{
Var amount1 = text1.value
Var amount2 = text2.value
Var total=eval(amount1) + eval(amount2)
text3.value=total
alter("Correct Answer")
}
</script>
</head>
<body>
<center>
<form>
<table width="20%" border="1" cellpadding="1" cellspacing="1" >
<tr>
<td width="10%" align="center">Amount1</td>
<td width="10%"><input type="number" name="text1" value="" min="1001" max="8000"></td>
</tr>
<tr>
<td width="10%" align="center">Amount2</td>
<td width="10%"><input type="number" name="text2" value="" min="1001" max="8000"></td>
</tr>
<tr>
<td width="10%" align="center">Total</td>
<td width="10%"><input type="number" name="text3" value="" min="1001" max="8000""></td>
</tr>
<tr>
<td width="10%"></td>
<td width="10%"><INPUT TYPE="button" NAME="Submit" VALUE="Compute" onclick="total()">
<input type=reset Value="Clear" size="30"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
I want to get summed value in text3 but function does not excecute.
What is wrong in my codes?
Please help