开发者

javascript split string [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

how to split a string in j开发者_JAVA技巧avascript

how can i split a string into a array in javascript ?


You can use split(), using a pattern that matches your separator :

>>> 'a,b,c'.split(/,/)
["a", "b", "c"]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜