adsense


Sunday, 8 November 2015

VB SCRIPT LEN AND INSTR FUNCTION PAGE 48

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




VB SCRIPT LEN AND INSTR FUNCTION





Len Function 

The Len Function returns the length of the given input string including the blank spaces. 

Instr function 

Syntax 
Len(String) 
Example 
<!DOCTYPE html> 
<html> 
<body> 
<script language="vbscript" type="text/vbscript"> 
 
var1 =       "Microsoft VBScript" 
document.write("Length of var1 is : " & Len(var1) & "<br />") 
 
var2 =       "       Microsoft VBScript           " 
document.write("Length of var2 is : " & Len(var2) & "<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: 
Length of var1 is : 18 
Length of var2 is : 36 


No comments: