adsense


Showing posts with label VB SCRIPT LEFT FUNCTION. Show all posts
Showing posts with label VB SCRIPT LEFT FUNCTION. Show all posts

Saturday, 7 November 2015

VB SCRIPT LEFT FUNCTION PAGE 42

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




VB SCRIPT LEFT FUNCTION





Left Function 

The Left Function returns a specified number of characters from the left side of the given input string. 
Syntax 
Left(String, Length) 


• String, a Required Parameter. Input String from which the 
specified number of characters to be returned from left side. 

 

• Length, a Required Parameter. An Integer, which specifies 
the number of characters to be returned. 

Example 
<!DOCTYPE html> 
<html> 
<body> 
<script language="vbscript" type="text/vbscript"> 
 
var="Microsoft VBScript" 
document.write("Line 1 : " & Left(var,2) & "<br />") 
var="MS VBSCRIPT" 
document.write("Line 2 : " & Left(var,5) & "<br />") 
var="microsoft" 
document.write("Line 3 : " & Left(var,9) & "<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 : Mi 
Line 2 : MS VB 
Line 3 : microsoft