let url = 'https://alibaba.com?a=1&b=2&c=3#hash'
function queryUrlParams(URL){let url = URL.split('?')[1];const urlSearchParams = new URLSearchParams(url);console.log('url1', urlSearchParams);console.log('entries',urlSearchParams.entries())const params = Object.fromEntries(urlSearchParams.entries());return params;
}
console.log(queryUrlParams(url));
https://developer.mozilla.org/zh-CN/docs/Web/API/URLSearchParams/entries