美文网首页
javascript 字符串 String

javascript 字符串 String

作者: 楚怀哲 | 来源:发表于2016-11-30 15:59 被阅读0次
const dirName = Config.APP_Course_New;
let index = Config.APP_Course_New.lastIndexOf('/');
if (index !== -1)
{
    dirName = dirName.substring(index+1);
}
index = dirName.lastIndexOf(".");
dirName = dirName.substring(0,index);
console.log('dirName dirName ' +dirName);

http://www.w3school.com.cn/jsref/jsref_obj_string.asp

相关文章

网友评论

      本文标题:javascript 字符串 String

      本文链接:https://www.haomeiwen.com/subject/ipjtmttx.html