js截取指定字符前面或后面的內容 原文鏈接:https://blog.csdn.net/caiyongshengCSDN/article/details/88420416 ...
js截取指定字符前面或后面的內容 原文鏈接:https://blog.csdn.net/caiyongshengCSDN/article/details/88420416 ...
原文鏈接:https://blog.csdn.net/caiyongshengCSDN/article/details/88420416 ...
下面給出任意字符串,該字符串長度未定,只知道該字符串有許多個‘-’連接起來的,現在要把最后一個‘-’后面的字符替換掉為指定串。 假如字符串為:'x1253-axebx-xcdx-o9kgl-3ddll-llllll-4lldfl',我們把最后一個‘-’后面的‘4lldfl’替換成‘1593654 ...
function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring(index+1,obj.length ...
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 ...
function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring(index+1,obj.length); ...