<!DOCTYPE html>
<html>
<body>
<p>Math.random() returns a random number between 0 and 1.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = Math.random();
}
</script>
</body>
</html>