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); ...