我想将此数组转换为长度为1:
var myArray = ("The,boy,and,the,girl")
到长度为5的数组:
myArray = ("The","boy","and","the","girl")
答案 0 :(得分:4)
您可以在数组中的字符串上使用方法.split()
:
myArray = myArray[0].split(",");
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001555.html