<!doctype html>
<html>
<head>
<script>
function sum()
{
var a,b,c;
a=Number(document.getElementById("first").value);
b=Number(document.getElementById("second").value);
{
alert(a+b);
}
}
</script>
</head>
<body>
Enter the First number : <input id="first"><br>
Enter the Second number: <input id="second"><br><br>
<button onclick="sum()">Add</button>
</body>
</html>
keep it up
ReplyDeletePost a Comment