<html>
<body>
<p>Enter the First Number: <input id="first"></p>
<p>Enter the Second Number: <input id="second"></p>
<button onclick="add()">Add</button>
<p>Sum = <input id="answer1"></p>
<script>
function add()
{
var a, b, sum;
a = parseInt(document.getElementById("first").value);
b = parseInt(document.getElementById("second").value);
sum = a + b;
document.getElementById("answer1").value = sum;
}
</script>
</body>
</html>