在javascript中拆分数组字符串(拆分不起作用)

在javascript中拆分数组字符串(拆分不起作用),javascript,jquery,arrays,string,split,Javascript,Jquery,Arrays,String,Split,我有一个类似[“一,二,三”]的数组。 我想把它转换成[“一”、“二”、“三”]。 我使用了拆分这样做: $var temp=["one, two, three"]; temp.split(", "); 这给了我错误。你知道怎么做吗?这是一个只有一个值的数组,你可以通过[0]访问它来获取字符串 var temp = ["one, two, three"]; var arr = temp[0].split(", "); 把括号放下似乎更容易些 var arr = "one, two, thr

我有一个类似[“一,二,三”]的数组。 我想把它转换成[“一”、“二”、“三”]。 我使用了拆分这样做:

$var temp=["one, two, three"];
temp.split(", ");

这给了我错误。你知道怎么做吗?

这是一个只有一个值的数组,你可以通过
[0]
访问它来获取字符串

var temp = ["one, two, three"];
var arr  = temp[0].split(", ");
把括号放下似乎更容易些

var arr = "one, two, three".split(', ');
或者以数组的形式开始编写?

对我有效:[“一、二、三”]-这样就不起作用了。。
["one, two, three"].pop().split(", ")
var temp=["one, two, three"];
temp[0].split(", ")