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"]
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"]
精彩评论