Use prompt
like so:
var number1 = parseInt(prompt("Enter a number"));
var number2 = parseInt(prompt("Enter another number"));
document.write(`${number1} + ${number2} = ${number1 + number2}<br>${number1} * ${number2} = ${number1 * number2}`);
solved How to get user input and output it onto the web page [closed]