programming-examples/js/Basic/Write a JavaScript program to calculate multiplication and division of two numbers (input from user)..js
2019-11-18 14:44:36 +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;
}