I want to be able to change a variable to true with the click of a button

So i want to make my button so it changes to true in the Script part. This is so a random number will appear in the p element


<!doctype html>
<html>
<button>
random number
</button>
<p id="randomnumber">

</p>



</html>
<script>
if (document.getElementById('button').clicked == true)
{
document.getElementById("randomnumber").innerHTML = (Math.floor(Math.random()*21)+2);

}


</script>