GetUrlParam:获取Url参数,返回一个对象
function GetUrlParam(){
let url = document.location.toString();
let arrObj = url.split("?");
let params = Object.create(null)
if (arrObj.length > 1){
arrObj = arrObj[1].split("&");
arrObj.forEach(item=>{
item = item.split("=");
params[item[0]] = item[1]
})
}
return params;}
// ?a=1&b=2&c=3 ==> {a: "1", b: "2", c: "3"}