adsense


Sunday, 8 November 2015

VB SCRIPT STRING FUNCTION PAGE 52

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




VB SCRIPT STRING FUNCTION





String Function 


The String Function fills a string with the specified 
character the specified number of times. 
Syntax 
String(number,character) 

• Number, a Required Parameter. An integer value, 
which would be repeated for the specified number 
of times against the character parameter. 

 

• Character, a Required Parameter. Character value, 
which has to be repeated for the specified number of times. 

Example 
<!DOCTYPE html> 
<html> 
<body> 
<script language="vbscript" type="text/vbscript"> 
 
document.write("Line 1 :" & String(3,"$") & "<br />") 
document.write("Line 2 :" & String(4,"*") & "<br />") 
document.write("Line 3 :" & String(5,100) & "<br />") 
document.write("Line 4 :" & String(6,"ABCDE") & "<br />") 
 
</script> 
</body> 
</html> 
When you save it as .html and execute it in Internet Explorer, 
then the above script will produce the following result: 
Line 1 :$$$ 
Line 2 :**** 
Line 3 :ddddd 
Line 4 :AAAAAA 


No comments: