Generate Random Numbers

[Total: 0    Average: 0/5]

This example shows you a simple and easy way to generate a random number using javascript.

Head Code:

<script langauge="javascript">
function RandomNumber(maxnumber) {
  var number = Math.round(maxnumber * Math.random());

Body Code:

  <input type="button" value="Generate a Random Number Between 0 and 100"

Times Viewed: 3

Leave a Reply

Your email address will not be published. Required fields are marked *