What is the use of Mid() function in VBScript?
Mid
The Mid function returns a specified number of characters from a given input string.
Syntax
Mid(String,start[,Length])
<!DOCTYPE html>
<html>
<body>
<script language = "vbscript" type = "text/vbscript">
var = "SlightBook Website"
document.write("Line 1 : " & Mid(var,2) & "<br />")
document.write("Line 2 : " & Mid(var,2,5) & "<br />")
document.write("Line 3 : " & Mid(var,5,8) & "<br />")
</script>
</body>
</html>
When you save it as .html and execute it in the browser, then the above script will produce the following output −
Line 1: lightBook Website
Line 2: light
Line 3: htBook W
What is the use of Spaces() function in VBScript?
What is the use of the Trim() function in VBScript?
Does Variant data type contain different kinds of information in VBScript?
How many data types does VBScript have?
VBScript is based on?