getUrl(){
let sUrlQs = window.location.search.substr(1
);
var args =
{};
var items = sUrlQs.length ? sUrlQs.split("&"
) : [];
var item =
null,
len =
items.length;
for(
var i = 0; i < len; i++
) {
item = items[i].split("="
);
var name = decodeURIComponent(item[0
]),
value = decodeURIComponent(item[1
]);
if(name) {
args[name] =
value;
}
}
return args
}
转载于:https://www.cnblogs.com/bigDipper/p/9306552.html
相关资源:JavaScript获取Url中的参数(解决中文乱码)