SOURCE

let key = "211_01_13_50";
function geiUri(key) {
    let firstPos = key.indexOf("_");
    let secondPos = key.indexOf("_", firstPos + 1);
    console.log(firstPos + "," + secondPos)
    let res = key.slice(firstPos + 1, secondPos);
    console.log(res);
    console.log("-----------------");
}

geiUri(key);


function getLastKey(key){
    let lastPos = key.lastIndexOf("_");
	let res = key.slice(lastPos+1);
	console.log(res);
}

getLastKey(key);

console 命令行工具 X clear

                    
>
console