var params = window.location.search.slice(1).split("&"); console.log(params); for(var p=0; p