js使用split以空字符劈开问题
解决方法:
要想获取字符串"one two three "中的三个元素,使用split劈开示例如下所示:
var colArr="one two three ".trim().split(/\s+/);
结果就是["one","two","three"]
向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
js使用split以空字符劈开问题
解决方法:
要想获取字符串"one two three "中的三个元素,使用split劈开示例如下所示:
var colArr="one two three ".trim().split(/\s+/);
结果就是["one","two","three"]
有建议,请留言!