// 获取地址中的参数 function parseUrl() { var searchHref = window.location.search.replace('?', ''); var params = searchHref.split('&'); var returnParam = {}; params.forEach(function(param) { var paramSplit = param.split('='); returnParam[paramSplit[0]] = paramSplit[1]; }); return returnParam; }
//引用 let theRequest = parseUrl()