|
Join 函数返回一个由数组中若干子字符串组成的字符串。
参数 | 描述 | list | 必需。一维数组,其中包含需被连接的子字符串。 | delimiter | 可选。用于在返回的字符串中分割子字符串的字符。默认是空格字符。 |
- days=Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
- document.write(Join(days) & "<br />")
- document.write(Join(days,",") & "<br />")
- document.write(Join(days," ### "))
复制代码
结果:
- Sun Mon Tue Wed Thu Fri Sat
- Sun,Mon,Tue,Wed,Thu,Fri,Sat
- Sun ### Mon ### Tue ### Wed ### Thu ### Fri ### Sat
复制代码 |
|