js 删除字符串前几位字符,和删除最后一个字符

//删除最后一个字符串
 this.allId = this.allId.substring(0,this.allId.length - 1);
 //删除前四个字符串
 this.allId = this.allId.slice(4);

数据是这样的,需要把前面的(all,)和最后的(,)删掉

结果

这样ok喽

 

posted @ 2019-08-26 19:58  金陵彭于晏  阅读(32407)  评论(0编辑  收藏  举报