form
h1 Калькулятор
label(for="number-1") Число 1
input#number-1(type="text")
label(for="number-2") Число 2
input#number-2(type="text")
input(type="button" value="+" onclick="resultPlus();")
input(type="button" value="-")
input(type="button" value="x")
input(type="button" value="/")
input(type="button" value="%")
label Результат:
input(type="text" name="result_plus")
var
number1 = document.getElementById('number-1').value,
number2 = document.getElementById('number-2').value,
plus = number1 + number2,
minus = number1 - number2,
multiply = number1 * number2,
divide = number1 / number2;
function resultPlus() {
result_plus = document.getElementsByName('result_plus')[0];
result_plus.innerHTML = plus;
}