Created
May 15, 2014 02:37
-
-
Save miketahani/cacda1e900efa8cfc292 to your computer and use it in GitHub Desktop.
parse simple querystring parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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