Enter first number

Enter second number


 


<html>

<head>

<script language="javascript">
<!--
function calc()
{
var num1,num2
num1=Number(document.form1.txtNum1.value)
num2=Number(document.form1.txtNum2.value)
document.form1.txtSum.value=num1+num2
}
//-->
</script>
</head>
<body>

<form name="form1">
Enter first number<br>
<input type ="text" name="txtNum1" size=8><br>
Enter second number<br>
<input type ="text" name="txtNum2" size=8><br>

<input type="button" value="ADD" onclick="calc()"><br>

<input type ="text" name="txtSum">
</form>
</body>
</html>