首页 > 代码库 > URL的截取问题

URL的截取问题

 

$(function (){
if (window.location.href.includes(‘?‘)) {
if (window.location.href.split(‘?‘)[1].split(‘=‘)[0] === ‘bank‘) {
var bank = window.location.href.split(‘?‘)[1].split(‘=‘)[1];
$(‘#selbank‘).text(decodeURI(bank));
}
}
})

URL的截取问题