<html>
<script>
function addvalues(){
var a=parseInt(document.form.first.value);
var b=parseInt(document.form.second.value);
var c;
c=a+b;
document.getElementById('result').innerHTML=c;
}
</script>
<body>
<form name="form">
Enter the First Number<br>
<input type="text" name="first">
<br>
Enter the Second Number<br>
<input type="text" name="second">
<br>
<input type="button" value="add this" onclick='addvalues()'>
</form>
Result Show Here
<div id="result"></div>
</body>
</html>
Result Show Here <script>
function addvalues(){
var a=parseInt(document.form.first.value);
var b=parseInt(document.form.second.value);
var c;
c=a+b;
document.getElementById('result').innerHTML=c;
}
</script>
<body>
<form name="form">
Enter the First Number<br>
<input type="text" name="first">
<br>
Enter the Second Number<br>
<input type="text" name="second">
<br>
<input type="button" value="add this" onclick='addvalues()'>
</form>
Result Show Here
<div id="result"></div>
</body>
</html>