javascript 怎样将数组转化为字符串

2024-11-02 05:09:27
推荐回答(2个)
回答1:

var a = [1,2,3];
alert(a.join());
alert(a.join(""));
var b = ['1','2','3'];
alert(b.join(""));

回答2:

var arr = [1,2,3];
var str = arr.join();