programming-examples/js/_Basic/Write a JavaScript program to calculate multiplication and division of two numbers (input from user)..js
2019-11-15 12:59:38 +01:00

13 lines
462 B
JavaScript

function multiplyBy()
{
num1 = document.getElementById("firstNumber").value;
num2 = document.getElementById("secondNumber").value;
document.getElementById("result").innerHTML = num1 * num2;
}
function divideBy()
{
num1 = document.getElementById("firstNumber").value;
num2 = document.getElementById("secondNumber").value;
document.getElementById("result").innerHTML = num1 / num2;
}