let str = sUrl.split('?')[1].split('#')[0] let arr1 = str.split('&') let obj = {} for (let i of arr1) { obj[i.split('=')[0]] = [] } for (let i of arr1) { obj[i.split('=')[0]].push(Number(i.split('=')[1])) } if (sKey) { for (let item in obj) { if (item == sKey) return obj[sKey].length == 1 ? obj[sKey].toString() : obj[sKey] } return '' } else return obj