<!DOCTYPE html>
<html>
<body>

<p>Click the button to display a random number between 1 and 100.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("demo")
    x.innerHTML = Math.floor((Math.random() * 100) + 1);
}
</script>

</body>
</html>