开发者

javascript split string [duplicate]

开发者 https://www.devze.com 2023-02-25 10:16 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: how to split a string in j开发者_JAVA技巧avascript
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

精彩评论

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