function queryParams(){ var queryStr = window.location.search.substring(1); var paramsArr = queryStr.split('&'); var tmp; var params = {}; for (var i = 0; i < paramsArr.length;i++){ tmp = paramsArr[i].split('='); params[tmp[0]] = tmp[1]; } return params; }
Javascript: QueryString zerlegen
Schreibe eine Antwort