Maths: Addition

Maths: Addition

function Addition(){
 number1 = parseInt(document.getElementById('number1').options[document.getElementById('number1').selectedIndex].value);
 number2 = parseInt(document.getElementById('number2').options[document.getElementById('number2').selectedIndex].value);
 output = number1 + number2;
 document.getElementById('playingWithMaths').innerHTML = 'Result: '+output;
}
Comments are closed.