ฟังก์ชันเข้าร่วม VBScript
❮ การอ้างอิง VBScript ที่สมบูรณ์
ฟังก์ชัน Join ส่งกลับสตริงที่ประกอบด้วยสตริงย่อยจำนวนหนึ่งในอาร์เรย์
ไวยากรณ์
Join(list[,delimiter])
Parameter | Description |
---|---|
list | Required. A one-dimensional array that contains the substrings to be joined |
delimiter | Optional. The character(s) used to separate the substrings in the returned string. Default is the space character |
ตัวอย่าง
ตัวอย่าง
การแยกรายการในอาร์เรย์โดยมีและไม่ใช้พารามิเตอร์ตัวคั่น:
<%
days=Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
response.write(Join(days) & "<br />")
response.write(Join(days,",") & "<br />")
response.write(Join(days," ### "))
%>
ผลลัพธ์ของโค้ดด้านบนจะเป็น:
Sun Mon Tue Wed Thu Fri Sat
Sun,Mon,Tue,Wed,Thu,Fri,Sat
Sun ### Mon ### Tue ### Wed ### Thu ### Fri ### Sat
❮ การอ้างอิง VBScript ที่สมบูรณ์