VBScript Multiple choices


Total available count: 25
Subject - Scripting Languages
Subsubject - VBScript

What is the use of Mid() function in VBScript?


 

 

 

 



C


Solution:-

Mid
The Mid function returns a specified number of characters from a given input string.

Syntax

Mid(String,start[,Length])
  1. String, a Required Parameter. Input String from which the specified number of characters to be returned.
  2. Start, a Required Parameter. An Integer, which Specifies starting position of the string.
  3. Length, an Optional Parameter. An Integer, which specifies the number of characters to be returned.
<!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




Next 5 multiple choice(s)

1

What is the use of Spaces() function in VBScript?

2

What is the use of the Trim() function in VBScript?

3

Does Variant data type contain different kinds of information in VBScript?

4

How many data types does VBScript have?

5

VBScript is based on?

Comments