js截取最后一个斜杠的内容

var str = "/aaaa/bbbb/ccc/cccc/dddd";

var index = str .lastIndexOf("\/");  

str  = str .substring(index + 1, str .length);

 

————————

来源:https://blog.csdn.net/kaola_l/article/details/80425744

posted @ 2020-04-24 09:11  奔向太阳的向日葵  阅读(2151)  评论(0编辑  收藏  举报