10. js截取最后一个斜杠后面的字符串

Posted on 2017-04-24 15:26  zkx4213  阅读(2229)  评论(0编辑  收藏  举报

var startIndex = filePath.lastIndexOf("\\");

endIndex = filePath.lastIndexOf(".");

var fileName = filePath.substring(startIndex + 1, endIndex);

Copyright © 2024 zkx4213
Powered by .NET 9.0 on Kubernetes