var a = "https://images.wanjunshijie.com/2021/05/20210507132012238.jpg";
var b = a.split("/");
var c = b.slice(b.length - 1, b.length).toString(String).split(".");
console.log(c[0])
//文件名 20210507132012238
console.log(c[1])
//文件后缀 jpg
var a = "https://images.wanjunshijie.com/2021/05/20210507132012238.jpg";
var b = a.split("/");
var c = b.slice(b.length - 1, b.length).toString(String).split(".");
console.log(c[0])
//文件名 20210507132012238
console.log(c[1])
//文件后缀 jpg