【js】获取URL的地址,并且获取分隔符/的值

let params = window.location.pathname.split('/')[4];
console.log(params);

你可能感兴趣的:(javascript)