The random() method defines a random integer that can be 0 or 1. Or, you can control which integer you want it to be. For example, defining 4 would pick numbers 0-4.
Browser support: all
Original TheMadScript Version: 1.0.0
Newer Version: 2.0.0
Newer Version: 2.0.0
Syntax: random(integer,result);
Note: You do not have to use quotes for the integer.
The following syntax below displays an alert box that will show a number that could be anything from 0 to 100:
random(100,"box_alert(num_rand)");
No comments:
Post a Comment