标签:cti ret class string hang last 指定 字符 字符串截取
function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring(index+1,obj.length); // console.log(obj); return obj; } var str="字符串截取(某个指定字符之后)-zhangchenxiao"; getCaption(str);
打印:zhangchenxiao
标签:cti ret class string hang last 指定 字符 字符串截取
原文地址:https://www.cnblogs.com/xiaoxiao2017/p/13254794.html