var params = {}; window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str, key, value) { params[key] = decodeURIComponent(value.replace(/\+/g, ' ')); }); console.log(params);
Great one
Great one
ReplyDelete