一、数组转字符串
//数组转字符串
var a, b;
a = new Array(0,1,2,3,4);
b = a.join(","); //得到字符串
二、字符串转数组
//字符串转数组
var s = "abc,abcd,aaa";
ss = s.split(",");// 在每个逗号(,)处进行分解。得到数组
2023-08-08 19:24:52
一、数组转字符串
//数组转字符串
var a, b;
a = new Array(0,1,2,3,4);
b = a.join(","); //得到字符串
二、字符串转数组
//字符串转数组
var s = "abc,abcd,aaa";
ss = s.split(",");// 在每个逗号(,)处进行分解。得到数组