1<body>
2<h1>Adding 'a' and 'b'</h1>
3
4 a: <input type="number" name="a" id="a"><br>
5 b: <input type="number" name="b" id="b"><br>
6 <button onclick="add(document.getElementById('a').value,document.getElementById('b').value)">Add</button>
7
8<script>
9 function add(a,b) {
10 var sum = parseInt(a) + parseInt(b);
11 alert(sum);
12 }
13</script>
14</body>