Skip to content

Instantly share code, notes, and snippets.

@henrypoydar
Created May 1, 2009 20:28
Show Gist options
  • Save henrypoydar/105240 to your computer and use it in GitHub Desktop.
Save henrypoydar/105240 to your computer and use it in GitHub Desktop.
function queryObject() {
var pairs, pair;
var query = new Array;
pairs = document.location.search.slice(1).split('&');
for(var i = 0; i < pairs.length; i++) {
pair = pairs[i].split('=');
query[pair[0]] = pair[1];
}
return query;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment