我有一个看起来像这样的字符串:
"assets/images/1.jpg;assets/images/2.jpg;assets/images/3.jpg";
如何创建一个数组来推送其中的每个链接并删除;?
类似的东西:
var images:Array = {assets/images/1.jpg,assets/images/2.jpg,assets/images/3.jpg};
答案 0 :(得分:1)
使用
s = "assets/images/1.jpg;assets/images/2.jpg;assets/images/3.jpg";
a = s.split(";");