Math Random number: a random number between 0 and 1 : Random « Language Basics « JavaScript DHTML






Math Random number: a random number between 0 and 1

  

<html>
<body>

<script type="text/javascript">

    document.write(Math.random())

</script>

</body>
</html>


           
         
    
  








Related examples in the same category

1.Unique Random Numbers
2.Unique Random Sets
3.Random number from 0 to 10: a random number from 0 to 10 using the random() and round()
4.Random link
5.A Random Ad Display Page
6.Random URL
7.Find the random number in a range