Skip to content

Instantly share code, notes, and snippets.

@miketahani
Created May 15, 2014 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miketahani/cacda1e900efa8cfc292 to your computer and use it in GitHub Desktop.
Save miketahani/cacda1e900efa8cfc292 to your computer and use it in GitHub Desktop.
parse simple querystring parameters
var qs = window.location.search.substr(1).split('&'),
args = {};
qs.forEach(function(arg) {
arg = arg.split('=');
args[arg[0]] = arg[1];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment