1.数组 转 字符串
var a, b;
a = new Array('a','b','c','d','e');
b = a.join("-");
document.write(b);
document.write(typeof a);
document.write(typeof b);
<span style="font-family: Verdana, Arial, 宋体; line-height: 18px; background-color: rgb(249, 249, 249);">join() 方法用于把数组中的所有元素放入一个字符串。</span>
2.字符串 转 数组
var s = "abc,abcd,aaa";
ss = s.split(",");// 在每个逗号(,)处进行分解。
document.write(ss);
document.write(typeof ss);
document.write(typeof s);
<span style="font-family: Verdana, Arial, 宋体; line-height: 18px; background-color: rgb(249, 249, 249);">split() 方法用于把一个字符串分割成字符串数组。</span>