JS字符串截取(获取指定字符后面的所有字符内容) function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring ...
function getCaption obj var index obj.lastIndexOf obj obj.substring index ,obj.length console.log obj return obj var str 执法办案流程 立案审批 getCaption str 最后得到的结果是立案审批 ...
2017-11-28 10:41 0 62416 推荐指数:
JS字符串截取(获取指定字符后面的所有字符内容) function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring ...
function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring(inde ...
function getCaption(obj, text){ let index = obj.lastIndexOf(text) + text.length-1; obj ...
原文链接:https://blog.csdn.net/caiyongshengCSDN/article/details/88420416 ...
js截取指定字符前面或后面的内容 原文链接:https://blog.csdn.net/caiyongshengCSDN/article/details/88420416 ...
要求:获取某个字符指定字符的前面或后面的所有字符内容 示例: URL = https://www.baid/v2/user/login (1)想要获取v2的数据:v2/user/login print url[url.rfind('/v2 ...
str为要截取的字符串 通过获取字符串中“-”的坐标index,其他特殊字符以此类推 效果如图, ...
function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring(index+1,obj.length); ...