Join 函数可返回一个由某个数组中一系列子字符串组成的字符串。
Join(list[,delimiter])
参数 | 描述 |
---|---|
list | 必需的。一维数组,其中包含需被连接的子字符串。 |
delimiter | 可选的。用于在返回的字符串中分割子字符串的字符。默认是空格字符。 |
dim a(5),b a(0)="Saturday" a(1)="Sunday" a(2)="Monday" a(3)="Tuesday" a(4)="Wednesday" b=Filter(a,"n") document.write(join(b))
输出:
Sunday Monday Wednesday
dim a(5),b a(0)="Saturday" a(1)="Sunday" a(2)="Monday" a(3)="Tuesday" a(4)="Wednesday" b=Filter(a,"n") document.write(join(b,", "))
输出:
Sunday, Monday, Wednesday