Random Numbers

The Script

      <SCRIPT type="text/javascript"> 
      function rand()
             now=new Date()
             alert("Your Random Number Is " + num)
          <h1>Random Numbers</h1>
	<input type="button" value="Display a Random 
	Number between 0 and 4"  onClick="rand()">

     You'll need to change the number after the percent sign to five and add a little text to the alert command, and you're good to go.

Close this window to return to Primer #20