function getCaption(url,parameter) { var index = url.lastIndexOf(parameter); url = url.substring(index+1,url.length); return url; } var url="http://www.baidu.com/123"; var a = getCaption(url,"/"); console.log(a,'aaa')
标签:index,url,最后,getCaption,获取,地址,var,parameter From: https://www.cnblogs.com/wangshengli520/p/17085167.html