adsense


Showing posts with label ADVANCE VB SCRIPT RANDOMIZE. Show all posts
Showing posts with label ADVANCE VB SCRIPT RANDOMIZE. Show all posts

Friday, 13 November 2015

ADVANCE VB SCRIPT RANDOMIZE PAGE 221

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button




ADVANCE VB SCRIPT RANDOMIZE






Randomize 


The Randomize statement initializes the random number generator 
which is helpful for the developers to generate a random number. 
Syntax 
 Randomize [number] 
Example 
Upon Executing the following script, Winword gets opened and 
the specified text is entered. 
<!DOCTYPE html> 
<html> 
<body> 
<script language="vbscript" type="text/vbscript"> 
   
  Dim MyValue 
  Randomize    
  MyValue = Int((100 * Rnd) + 1)   ' Generate random value between 1 and 100. 
  MsgBox MyValue 
   
</script> 
</body> 
</html> 
Save the above script as HTML and upon executing the script in IE, 
the following output is shown. 
42