js字符串截取(获取指定字符后面的所有字符内容)
function getCaption(obj, text){
let index = obj.lastIndexOf(text) + text.length-1;
obj = obj.substring(index+1,obj.length);
return obj;
}
let str=" 执法办案流程-立案审批";
getCaption(str,'-');
function getCaption(obj, text){
let index = obj.lastIndexOf(text) + text.length-1;
obj = obj.substring(index+1,obj.length);
return obj;
}
let str=" 执法办案流程-立案审批";
getCaption(str,'-');