First of all you create an html file. You can name that html file according to you. Then after that you add the below code to that html file. After adding the code, you can add this file. Run it on your browser. The number of times you refresh the page in the browser, the rendom number will continue to be generated.
<p id="sixdigitnumber"></p> <script> var sixdigitsrandom = Math.floor(100000 + Math.random() * 900000); document.getElementById("sixdigitnumber").innerHTML=sixdigitsrandom; // alert(sixdigitsrandom); </script>