
- VBScript Tutorial
- VBScript - Home
- VBScript - Overview
- VBScript - Syntax
- VBScript - Enabling
- VBScript - Placement
- VBScript - Variables
- VBScript - Constants
- VBScript - Operators
- VBScript - Decisions
- VBScript - Loops
- VBScript - Events
- VBScript - Cookies
- VBScript - Numbers
- VBScript - Strings
- VBScript - Arrays
- VBScript - Date
- VBScript Advanced
- VBScript - Procedures
- VBScript - Dialog Boxes
- VBScript - Object Oriented
- VBScript - Reg Expressions
- VBScript - Error Handling
- VBScript - Misc Statements
- VBScript Useful Resources
- VBScript - Questions and Answers
- VBScript - Quick Guide
- VBScript - Useful Resources
- VBScript - Discussion
VBScript Join Function
A Function, which returns a String that contains a specified number of substrings in an array. This is an exact opposite function of Split Method.
Syntax
Join(List[,delimiter])
List, a Required parameter. An Array that contains the substrings that are to be joined.
delimiter, an Optional Parameter. The Character, which used as a delimiter while returning the string. The Default delimiter is Space.
Example
<!DOCTYPE html> <html> <body> <script language = "vbscript" type = "text/vbscript"> ' Join using spaces a = array("Red","Blue","Yellow") b = join(a) document.write("The value of b " & " is :" & b & "<br />") ' Join using $ b = join(a,"$") document.write("The Join result after using delimiter is : " & b & "<br />") </script> </body> </html>
When the above code is saved as .html and executed in Internet Explorer, it produces the following result −
The value of b is :Red Blue Yellow The Join result after using delimiter is : Red$Blue$Yellow
vbscript_arrays.htm
Advertisements