一个函数,它返回一个字符串,该字符串在数组中包含指定数目的子字符串。这与拆分方法完全相反。
Join(List[,delimiter])
<!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>
结果:
The value of b is :Red Blue Yellow The Join result after using delimiter is : Red$Blue$Yellow