欢迎阅读『Tag标签列表』

字符串去空返回数组

var index=item.lineName.lastIndexOf(" ");//去空格
var obj=item.lineName.substring(index+1,item.lineName.length);
console.log(obj.split(/-/),'22222')
this.applicantAddress=obj.split(/-/)[0];
this.communityName=obj.split(/-/)[1];
posted @ 2019-04-20 18:06  兔子零-A酱  阅读(411)  评论(0编辑  收藏  举报