Instance
The code is as follows |
Copy Code |
<% Randomize Ip=int (225*RND) +25& "." &int (225*RND) +25& "." &int (225*RND) +25& "." &int (225*RND) +25 Response.Write (IP) %> |
About Randomize
Initializes a random number generator.
Randomize [number]
The number argument can be any valid numeric expression.
Description
Randomize initializes the RND function by using the number parameter to assign a new seed value to the random numbers generator. If number is omitted, the value returned by the system timer is used as the new seed value.
If you do not use Randomize, the first call to the Rnd function (without parameters) will use the same number as the seed value, followed by the last generated number as the seed value.
Note to repeat the sequence of random numbers, call Rnd with a negative argument immediately before you call Randomize with a numeric argument. Randomize that use the same number value cannot repeat the previous sequence of random numbers.