During a function call, the result is displayed on a new page (the address is the same, but the page is empty, and there is only a result on it).
What to do? How to display the text?
function someFunc() { var min = document.getElementById("min").value; var max = document.getElementById("max").value; var rand = min - 0.5 + Math.random() * (max - min + 1); rand = Math.round(rand); document.write(rand); } The result should be displayed between the tags.
<span id="rnd-num"></span>