JavaScript通过join函数将数组里的所有元素连接起来
<script type="text/javascript"> var days = ["Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday"]; document.write("days:"+days.join(",")); </script>
输出结果
days:Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday